From: Aaron Roth Date: Fri, 16 Oct 2015 14:54:02 +0000 (-0700) Subject: Missed some derivation from boost::noncopyable after deleting the .hpp header. X-Git-Tag: deprecate-dynamic-initializer~319 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=99cbb9cec777f20b2f6f5cad92709f1a032f2ad8;p=folly.git Missed some derivation from boost::noncopyable after deleting the .hpp header. 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 --- diff --git a/folly/RWSpinLock.h b/folly/RWSpinLock.h index 5be38d37..2e7bbba2 100644 --- a/folly/RWSpinLock.h +++ b/folly/RWSpinLock.h @@ -141,7 +141,6 @@ pthread_rwlock_t Read 728698 24us 101ns 7.28ms 194us #include #include #include -#include #include #include @@ -672,8 +671,11 @@ class RWTicketSpinLockT { class WriteHolder; typedef RWTicketSpinLockT 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(); }