From e3d118ed26f9720e22201f834be480642975a30e Mon Sep 17 00:00:00 2001 From: Praveen Kumar Date: Mon, 9 Mar 2015 21:02:53 +0530 Subject: [PATCH] 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 --- folly/io/async/AsyncServerSocket.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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(); -- 2.34.1