From a0b89d0a309dc809aed2a1efd282015e3e68d464 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Fri, 26 Apr 2002 17:45:53 +0000 Subject: [PATCH] function_base.hpp: - Workaround for Sun CC [SVN r13566] --- include/boost/function/function_base.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/boost/function/function_base.hpp b/include/boost/function/function_base.hpp index 9130cee..f817e6a 100644 --- a/include/boost/function/function_base.hpp +++ b/include/boost/function/function_base.hpp @@ -307,6 +307,10 @@ namespace boost { public: // should be protected, but GCC 2.95.3 will fail to allow access detail::function::any_pointer (*manager)( detail::function::any_pointer, +#if (defined __SUNPRO_CC) && (__SUNPRO_CC <= 0x530) && !(defined BOOST_NO_COMPILER_CONFIG) + // Sun C++ 5.3 can't handle the safe_bool idiom, so don't use it + operator bool () const { return !this->empty(); } +#else detail::function::functor_manager_operation_type); detail::function::any_pointer functor; @@ -320,6 +324,7 @@ namespace boost { public: operator safe_bool () const { return (this->empty())? 0 : &dummy::nonnull; } +#endif safe_bool operator!() const { return (this->empty())? &dummy::nonnull : 0; }