AsyncServerSocket disallow copy, move, and default ctor
authorPraveen Kumar <cpp.fool@gmail.com>
Fri, 13 Mar 2015 03:41:03 +0000 (09:11 +0530)
committerAndre Azevedo <aap@fb.com>
Wed, 18 Mar 2015 03:18:46 +0000 (20:18 -0700)
Summary:
AsyncServerSocket disallow copy construction, copy assignment,
move construction, move assignment, and default
construction.

Closes https://github.com/facebook/folly/pull/148

Test Plan: all folly/tests, make check for 37 tests, passed.

Reviewed By: ldbrandy@fb.com

Subscribers: lins, anca, folly-diffs@, yfeldblum

FB internal diff: D1912488

Signature: t1:1912488:1426267982:a9690ce9429016f89630f0ded64b7be9ff80c39d

folly/io/async/AsyncServerSocket.h

index a96f49fe1f7662c20c19a8c406480db9a3fa6971..46576aa255556dc97efa5f12cb005833b4f4b277 100644 (file)
@@ -59,6 +59,8 @@ namespace folly {
 class AsyncServerSocket : public DelayedDestruction {
  public:
   typedef std::unique_ptr<AsyncServerSocket, Destructor> UniquePtr;
+  // Disallow copy, move, and default construction.
+  AsyncServerSocket(AsyncServerSocket&&) = delete;
 
   class AcceptCallback {
    public: