BackoffTimeout disallow copy, move, default ctor
authorPraveen Kumar <cpp.fool@gmail.com>
Mon, 9 Mar 2015 15:32:53 +0000 (21:02 +0530)
committerAndre Azevedo <aap@fb.com>
Wed, 18 Mar 2015 03:18:46 +0000 (20:18 -0700)
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

folly/io/async/AsyncServerSocket.cpp

index 5e2c67725a4cef870efd7c712cc8e7e7f53f60fb..b48129c4ec77d683107ba8e3a270311fa21a5604 100644 (file)
@@ -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();