Boost logo

Boost-Commit :

From: pdimov_at_[hidden]
Date: 2007-08-26 15:42:50


Author: pdimov
Date: 2007-08-26 15:42:50 EDT (Sun, 26 Aug 2007)
New Revision: 38975
URL: http://svn.boost.org/trac/boost/changeset/38975

Log:
Updated the unspecified_bool_type to match shared_ptr.
Text files modified:
   trunk/boost/shared_array.hpp | 18 +++++++++++++++++-
   1 files changed, 17 insertions(+), 1 deletions(-)

Modified: trunk/boost/shared_array.hpp
==============================================================================
--- trunk/boost/shared_array.hpp (original)
+++ trunk/boost/shared_array.hpp 2007-08-26 15:42:50 EDT (Sun, 26 Aug 2007)
@@ -103,7 +103,23 @@
         return px != 0;
     }
 
-#elif defined(__MWERKS__) && BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003))
+#elif defined( _MANAGED )
+
+ static void unspecified_bool( this_type*** )
+ {
+ }
+
+ typedef void (*unspecified_bool_type)( this_type*** );
+
+ operator unspecified_bool_type() const // never throws
+ {
+ return px == 0? 0: unspecified_bool;
+ }
+
+#elif \
+ ( defined(__MWERKS__) && BOOST_WORKAROUND(__MWERKS__, < 0x3200) ) || \
+ ( defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ < 304) )
+
     typedef T * (this_type::*unspecified_bool_type)() const;
     
     operator unspecified_bool_type() const // never throws


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