From 99cbb9cec777f20b2f6f5cad92709f1a032f2ad8 Mon Sep 17 00:00:00 2001 From: Aaron Roth Date: Fri, 16 Oct 2015 07:54:02 -0700 Subject: [PATCH] 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 --- folly/RWSpinLock.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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(); } -- 2.34.1