From: Praveen Kumar Date: Mon, 9 Mar 2015 15:32:53 +0000 (+0530) Subject: BackoffTimeout disallow copy, move, default ctor X-Git-Tag: v0.31.0~2 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=e3d118ed26f9720e22201f834be480642975a30e;p=folly.git BackoffTimeout disallow copy, move, default ctor Summary: BackoffTimeout disallow copy construction, copy assignment, move construction, move assignment, and default construction. Closes https://github.com/facebook/folly/pull/146 Test Plan: runtests Reviewed By: ldbrandy@fb.com Subscribers: lins, anca, folly-diffs@, yfeldblum FB internal diff: D1912521 Signature: t1:1912521:1426268413:6edb2d8203d1efd1e825816f03be115ac46e55ca --- diff --git a/folly/io/async/AsyncServerSocket.cpp b/folly/io/async/AsyncServerSocket.cpp index 5e2c6772..b48129c4 100644 --- a/folly/io/async/AsyncServerSocket.cpp +++ b/folly/io/async/AsyncServerSocket.cpp @@ -116,9 +116,10 @@ void AsyncServerSocket::RemoteAcceptor::messageAvailable( */ class AsyncServerSocket::BackoffTimeout : public AsyncTimeout { public: + // Disallow copy, move, and default constructors. + BackoffTimeout(BackoffTimeout&&) = delete; BackoffTimeout(AsyncServerSocket* socket) - : AsyncTimeout(socket->getEventBase()), - socket_(socket) {} + : AsyncTimeout(socket->getEventBase()), socket_(socket) {} virtual void timeoutExpired() noexcept { socket_->backoffTimeoutExpired();