Boost logo

Boost-Commit :

From: anthony_at_[hidden]
Date: 2008-05-21 06:39:47


Author: anthonyw
Date: 2008-05-21 06:39:47 EDT (Wed, 21 May 2008)
New Revision: 45602
URL: http://svn.boost.org/trac/boost/changeset/45602

Log:
try_lock_wrapper has its own operator bool_type to avoid problems with a using declaration
Text files modified:
   trunk/boost/thread/locks.hpp | 5 ++++-
   1 files changed, 4 insertions(+), 1 deletions(-)

Modified: trunk/boost/thread/locks.hpp
==============================================================================
--- trunk/boost/thread/locks.hpp (original)
+++ trunk/boost/thread/locks.hpp 2008-05-21 06:39:47 EDT (Wed, 21 May 2008)
@@ -629,7 +629,10 @@
             using base::mutex;
             using base::release;
             typedef typename base::bool_type bool_type;
- using base::operator bool_type;
+ operator bool_type() const
+ {
+ return static_cast<base const&>(*this);
+ }
         };
         
         template<typename MutexType1,typename MutexType2>


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk