diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2013-10-19 08:57:20 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2013-10-19 08:57:20 +0200 |
commit | ed6115361006240e3c7b02295599e4534cc55a13 (patch) | |
tree | 612f12d6c7c49421102041fceb7609db8ab8257e /cutl/details/boost/smart_ptr/detail/operator_bool.hpp | |
parent | af8d1a0139ca105c6830f4ac7c320aca2e1c1f5e (diff) |
Update internal Boost subset to 1.54.0
Diffstat (limited to 'cutl/details/boost/smart_ptr/detail/operator_bool.hpp')
-rw-r--r-- | cutl/details/boost/smart_ptr/detail/operator_bool.hpp | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/cutl/details/boost/smart_ptr/detail/operator_bool.hpp b/cutl/details/boost/smart_ptr/detail/operator_bool.hpp index 842a05d..8ae1527 100644 --- a/cutl/details/boost/smart_ptr/detail/operator_bool.hpp +++ b/cutl/details/boost/smart_ptr/detail/operator_bool.hpp @@ -1,14 +1,21 @@ // This header intentionally has no include guards. // -// Copyright (c) 2001-2009 Peter Dimov +// Copyright (c) 2001-2009, 2012 Peter Dimov // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt -#if ( defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, < 0x570) ) || defined(__CINT__) +#if !defined( BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS ) && !defined( BOOST_NO_CXX11_NULLPTR ) - operator bool () const + explicit operator bool () const BOOST_NOEXCEPT + { + return px != 0; + } + +#elif ( defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, < 0x570) ) || defined(__CINT__) + + operator bool () const BOOST_NOEXCEPT { return px != 0; } @@ -21,7 +28,7 @@ typedef void (*unspecified_bool_type)( this_type*** ); - operator unspecified_bool_type() const // never throws + operator unspecified_bool_type() const BOOST_NOEXCEPT { return px == 0? 0: unspecified_bool; } @@ -31,18 +38,18 @@ ( defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ < 304) ) || \ ( defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, <= 0x590) ) - typedef T * (this_type::*unspecified_bool_type)() const; + typedef element_type * (this_type::*unspecified_bool_type)() const; - operator unspecified_bool_type() const // never throws + operator unspecified_bool_type() const BOOST_NOEXCEPT { return px == 0? 0: &this_type::get; } #else - typedef T * this_type::*unspecified_bool_type; + typedef element_type * this_type::*unspecified_bool_type; - operator unspecified_bool_type() const // never throws + operator unspecified_bool_type() const BOOST_NOEXCEPT { return px == 0? 0: &this_type::px; } @@ -50,7 +57,7 @@ #endif // operator! is redundant, but some compilers need it - bool operator! () const // never throws + bool operator! () const BOOST_NOEXCEPT { return px == 0; } |