Missed some derivation from boost::noncopyable after deleting the .hpp header.
authorAaron Roth <akr@fb.com>
Fri, 16 Oct 2015 14:54:02 +0000 (07:54 -0700)
committerfacebook-github-bot-9 <folly-bot@fb.com>
Fri, 16 Oct 2015 15:20:16 +0000 (08:20 -0700)
Summary: There remained some derivations from boost::noncopyable in inner classes after boost/noncopyable.hpp was deleted in D2459355. Get rid of these two.

Reviewed By: meyering

Differential Revision: D2485930

fb-gh-sync-id: 89546490b15fa4279debf4b9cabcf48d3dc336bb

folly/RWSpinLock.h

index 5be38d37ab0bd9543062a7027e6e2ccc601c08aa..2e7bbba2a27508fc3bba72e5c4aea029e1082245 100644 (file)
@@ -141,7 +141,6 @@ pthread_rwlock_t Read        728698     24us       101ns     7.28ms     194us
 #include <atomic>
 #include <string>
 #include <algorithm>
-#include <boost/noncopyable.hpp>
 
 #include <sched.h>
 #include <glog/logging.h>
@@ -672,8 +671,11 @@ class RWTicketSpinLockT {
   class WriteHolder;
 
   typedef RWTicketSpinLockT<kBitWidth, kFavorWriter> RWSpinLock;
-  class ReadHolder : boost::noncopyable {
+  class ReadHolder {
    public:
+    ReadHolder(ReadHolder const&) = delete;
+    ReadHolder& operator=(ReadHolder const&) = delete;
+
     explicit ReadHolder(RWSpinLock *lock = nullptr) :
       lock_(lock) {
       if (lock_) lock_->lock_shared();
@@ -709,8 +711,11 @@ class RWTicketSpinLockT {
     RWSpinLock *lock_;
   };
 
-  class WriteHolder : boost::noncopyable {
+  class WriteHolder {
    public:
+    WriteHolder(WriteHolder const&) = delete;
+    WriteHolder& operator=(WriteHolder const&) = delete;
+
     explicit WriteHolder(RWSpinLock *lock = nullptr) : lock_(lock) {
       if (lock_) lock_->lock();
     }