From 0069a4464012172f07b5f56064ed9ae6b79f9c52 Mon Sep 17 00:00:00 2001 From: Roger Meier Date: Wed, 7 Nov 2012 20:26:03 +0000 Subject: [PATCH] THRIFT-1748 Guard and RWGuard macros defined in global namespace 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 | 9 --------- 1 file changed, 9 deletions(-) diff --git a/lib/cpp/src/thrift/concurrency/Mutex.h b/lib/cpp/src/thrift/concurrency/Mutex.h index 1763b5c6..3cd84408 100644 --- a/lib/cpp/src/thrift/concurrency/Mutex.h +++ b/lib/cpp/src/thrift/concurrency/Mutex.h @@ -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_ -- 2.17.1