1 // This header intentionally has no include guards.
3 // Copyright (c) 2001-2009 Peter Dimov
5 // Distributed under the Boost Software License, Version 1.0.
6 // See accompanying file LICENSE_1_0.txt or copy at
7 // http://www.boost.org/LICENSE_1_0.txt
9 #if ( defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, < 0x570) ) || defined(__CINT__)
11 operator bool () const
16 #elif defined( _MANAGED )
18 static void unspecified_bool( this_type*** )
22 typedef void (*unspecified_bool_type)( this_type*** );
24 operator unspecified_bool_type() const // never throws
26 return px == 0? 0: unspecified_bool;
30 ( defined(__MWERKS__) && BOOST_WORKAROUND(__MWERKS__, < 0x3200) ) || \
31 ( defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ < 304) ) || \
32 ( defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, <= 0x590) )
34 typedef T * (this_type::*unspecified_bool_type)() const;
36 operator unspecified_bool_type() const // never throws
38 return px == 0? 0: &this_type::get;
43 typedef T * this_type::*unspecified_bool_type;
45 operator unspecified_bool_type() const // never throws
47 return px == 0? 0: &this_type::px;
52 // operator! is redundant, but some compilers need it
53 bool operator! () const // never throws