THRIFT-1317. cpp: Remove copy constructibility from
thrift::concurrency::Guard
Patch: Jordan DeLong
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1164164 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/src/concurrency/Mutex.h b/lib/cpp/src/concurrency/Mutex.h
index 3ee5c6b..3267c73 100644
--- a/lib/cpp/src/concurrency/Mutex.h
+++ b/lib/cpp/src/concurrency/Mutex.h
@@ -21,6 +21,7 @@
#define _THRIFT_CONCURRENCY_MUTEX_H_ 1
#include <boost/shared_ptr.hpp>
+#include <boost/noncopyable.hpp>
namespace apache { namespace thrift { namespace concurrency {
@@ -100,7 +101,7 @@
boost::shared_ptr<impl> impl_;
};
-class Guard {
+class Guard : boost::noncopyable {
public:
Guard(const Mutex& value, int64_t timeout = 0) : mutex_(&value) {
if (timeout == 0) {