From bca336bf35e98958e4d9df5841c11c7193db47eb Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sun, 26 Aug 2007 19:42:50 +0000 Subject: [PATCH] Updated the unspecified_bool_type to match shared_ptr. [SVN r38975] --- include/boost/shared_array.hpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/include/boost/shared_array.hpp b/include/boost/shared_array.hpp index eb69c8e..3b82f35 100644 --- a/include/boost/shared_array.hpp +++ b/include/boost/shared_array.hpp @@ -103,7 +103,23 @@ public: 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