annotate DEPENDENCIES/generic/include/boost/smart_ptr/detail/operator_bool.hpp @ 133:4acb5d8d80b6 tip

Don't fail environmental check if README.md exists (but .txt and no-suffix don't)
author Chris Cannam
date Tue, 30 Jul 2019 12:25:44 +0100
parents 2665513ce2d3
children
rev   line source
Chris@16 1 // This header intentionally has no include guards.
Chris@16 2 //
Chris@16 3 // Copyright (c) 2001-2009, 2012 Peter Dimov
Chris@16 4 //
Chris@16 5 // Distributed under the Boost Software License, Version 1.0.
Chris@16 6 // See accompanying file LICENSE_1_0.txt or copy at
Chris@16 7 // http://www.boost.org/LICENSE_1_0.txt
Chris@16 8
Chris@16 9 #if !defined( BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS ) && !defined( BOOST_NO_CXX11_NULLPTR )
Chris@16 10
Chris@16 11 explicit operator bool () const BOOST_NOEXCEPT
Chris@16 12 {
Chris@16 13 return px != 0;
Chris@16 14 }
Chris@16 15
Chris@16 16 #elif ( defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, < 0x570) ) || defined(__CINT__)
Chris@16 17
Chris@16 18 operator bool () const BOOST_NOEXCEPT
Chris@16 19 {
Chris@16 20 return px != 0;
Chris@16 21 }
Chris@16 22
Chris@16 23 #elif defined( _MANAGED )
Chris@16 24
Chris@16 25 static void unspecified_bool( this_type*** )
Chris@16 26 {
Chris@16 27 }
Chris@16 28
Chris@16 29 typedef void (*unspecified_bool_type)( this_type*** );
Chris@16 30
Chris@16 31 operator unspecified_bool_type() const BOOST_NOEXCEPT
Chris@16 32 {
Chris@16 33 return px == 0? 0: unspecified_bool;
Chris@16 34 }
Chris@16 35
Chris@16 36 #elif \
Chris@16 37 ( defined(__MWERKS__) && BOOST_WORKAROUND(__MWERKS__, < 0x3200) ) || \
Chris@16 38 ( defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ < 304) ) || \
Chris@16 39 ( defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, <= 0x590) )
Chris@16 40
Chris@16 41 typedef element_type * (this_type::*unspecified_bool_type)() const;
Chris@16 42
Chris@16 43 operator unspecified_bool_type() const BOOST_NOEXCEPT
Chris@16 44 {
Chris@16 45 return px == 0? 0: &this_type::get;
Chris@16 46 }
Chris@16 47
Chris@16 48 #else
Chris@16 49
Chris@16 50 typedef element_type * this_type::*unspecified_bool_type;
Chris@16 51
Chris@16 52 operator unspecified_bool_type() const BOOST_NOEXCEPT
Chris@16 53 {
Chris@16 54 return px == 0? 0: &this_type::px;
Chris@16 55 }
Chris@16 56
Chris@16 57 #endif
Chris@16 58
Chris@16 59 // operator! is redundant, but some compilers need it
Chris@16 60 bool operator! () const BOOST_NOEXCEPT
Chris@16 61 {
Chris@16 62 return px == 0;
Chris@16 63 }