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