#include <atomic>
#include <string>
#include <algorithm>
-#include <boost/noncopyable.hpp>
#include <sched.h>
#include <glog/logging.h>
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();
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();
}