From abbe975e8fc8377460869d075f98abf1b0ff7913 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Tue, 18 Aug 2015 18:14:50 +0100 Subject: [PATCH] Disable explicit operator bool on Oracle C++ Although Oracle supports this syntax, advanced usage such as: if(my_shared_ptr && x) Fail. Attempts to wokaround by adding additional operator overloads have so far failed. --- include/boost/smart_ptr/detail/operator_bool.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/boost/smart_ptr/detail/operator_bool.hpp b/include/boost/smart_ptr/detail/operator_bool.hpp index 8ae1527..c0289b8 100644 --- a/include/boost/smart_ptr/detail/operator_bool.hpp +++ b/include/boost/smart_ptr/detail/operator_bool.hpp @@ -6,7 +6,8 @@ // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt -#if !defined( BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS ) && !defined( BOOST_NO_CXX11_NULLPTR ) +#if !defined( BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS ) && !defined( BOOST_NO_CXX11_NULLPTR )\ + && !(defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, <= 0x5130)) explicit operator bool () const BOOST_NOEXCEPT {