THRIFT-1748 Guard and RWGuard macros defined in global namespace
authorRoger Meier <roger@apache.org>
Wed, 7 Nov 2012 20:26:03 +0000 (20:26 +0000)
committerRoger Meier <roger@apache.org>
Wed, 7 Nov 2012 20:26:03 +0000 (20:26 +0000)
Patch: Bud Bundy

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1406793 13f79535-47bb-0310-9956-ffa450edef68

lib/cpp/src/thrift/concurrency/Mutex.h

index 1763b5c..3cd8440 100644 (file)
@@ -183,15 +183,6 @@ class RWGuard : boost::noncopyable {
     const ReadWriteMutex& rw_mutex_;
 };
 
-
-// A little hack to prevent someone from trying to do "Guard(m);"
-// Such a use is invalid because the temporary Guard object is
-// destroyed at the end of the line, releasing the lock.
-// Sorry for polluting the global namespace, but I think it's worth it.
-#define Guard(m) incorrect_use_of_Guard(m)
-#define RWGuard(m) incorrect_use_of_RWGuard(m)
-
-
 }}} // apache::thrift::concurrency
 
 #endif // #ifndef _THRIFT_CONCURRENCY_MUTEX_H_