1 // This header intentionally has no include guards.
3 // Copyright (c) 2001-2009, 2012 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( BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS ) && !defined( BOOST_NO_CXX11_NULLPTR )\
10 && !(defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, <= 0x5130))
12 explicit operator bool () const BOOST_SP_NOEXCEPT
17 #elif ( defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, < 0x570) ) || defined(__CINT__)
19 operator bool () const BOOST_SP_NOEXCEPT
24 #elif defined( _MANAGED )
26 static void unspecified_bool( this_type*** )
30 typedef void (*unspecified_bool_type)( this_type*** );
32 operator unspecified_bool_type() const BOOST_SP_NOEXCEPT
34 return px == 0? 0: unspecified_bool;
38 ( defined(__MWERKS__) && BOOST_WORKAROUND(__MWERKS__, < 0x3200) ) || \
39 ( defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ < 304) ) || \
40 ( defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, <= 0x590) )
42 typedef element_type * (this_type::*unspecified_bool_type)() const;
44 operator unspecified_bool_type() const BOOST_SP_NOEXCEPT
46 return px == 0? 0: &this_type::get;
51 typedef element_type * this_type::*unspecified_bool_type;
53 operator unspecified_bool_type() const BOOST_SP_NOEXCEPT
55 return px == 0? 0: &this_type::px;
60 // operator! is redundant, but some compilers need it
61 bool operator! () const BOOST_SP_NOEXCEPT