Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:51:42

0001 //  This header intentionally has no include guards.
0002 //
0003 //  Copyright (c) 2001-2009, 2012 Peter Dimov
0004 //
0005 //  Distributed under the Boost Software License, Version 1.0.
0006 //  See accompanying file LICENSE_1_0.txt or copy at
0007 //  http://www.boost.org/LICENSE_1_0.txt
0008 
0009 #if !defined( BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS ) && !defined( BOOST_NO_CXX11_NULLPTR )\
0010     && !(defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, <= 0x5130))
0011 
0012     explicit operator bool () const BOOST_SP_NOEXCEPT
0013     {
0014         return px != 0;
0015     }
0016 
0017 #elif ( defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, < 0x570) ) || defined(__CINT__)
0018 
0019     operator bool () const BOOST_SP_NOEXCEPT
0020     {
0021         return px != 0;
0022     }
0023 
0024 #elif defined( _MANAGED )
0025 
0026     static void unspecified_bool( this_type*** )
0027     {
0028     }
0029 
0030     typedef void (*unspecified_bool_type)( this_type*** );
0031 
0032     operator unspecified_bool_type() const BOOST_SP_NOEXCEPT
0033     {
0034         return px == 0? 0: unspecified_bool;
0035     }
0036 
0037 #elif \
0038     ( defined(__MWERKS__) && BOOST_WORKAROUND(__MWERKS__, < 0x3200) ) || \
0039     ( defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ < 304) ) || \
0040     ( defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, <= 0x590) )
0041 
0042     typedef element_type * (this_type::*unspecified_bool_type)() const;
0043 
0044     operator unspecified_bool_type() const BOOST_SP_NOEXCEPT
0045     {
0046         return px == 0? 0: &this_type::get;
0047     }
0048 
0049 #else
0050 
0051     typedef element_type * this_type::*unspecified_bool_type;
0052 
0053     operator unspecified_bool_type() const BOOST_SP_NOEXCEPT
0054     {
0055         return px == 0? 0: &this_type::px;
0056     }
0057 
0058 #endif
0059 
0060     // operator! is redundant, but some compilers need it
0061     bool operator! () const BOOST_SP_NOEXCEPT
0062     {
0063         return px == 0;
0064     }