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 )
11 explicit operator bool () const BOOST_NOEXCEPT
16 #elif ( defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, < 0x570) ) || defined(__CINT__)
18 operator bool () const BOOST_NOEXCEPT
23 #elif defined( _MANAGED )
25 static void unspecified_bool( this_type*** )
29 typedef void (*unspecified_bool_type)( this_type*** );
31 operator unspecified_bool_type() const BOOST_NOEXCEPT
33 return px == 0? 0: unspecified_bool;
37 ( defined(__MWERKS__) && BOOST_WORKAROUND(__MWERKS__, < 0x3200) ) || \
38 ( defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ < 304) ) || \
39 ( defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, <= 0x590) )
41 typedef element_type * (this_type::*unspecified_bool_type)() const;
43 operator unspecified_bool_type() const BOOST_NOEXCEPT
45 return px == 0? 0: &this_type::get;
50 typedef element_type * this_type::*unspecified_bool_type;
52 operator unspecified_bool_type() const BOOST_NOEXCEPT
54 return px == 0? 0: &this_type::px;
59 // operator! is redundant, but some compilers need it
60 bool operator! () const BOOST_NOEXCEPT