forked from boostorg/function
function_base.hpp:
- Fixed strange patch weirdness on Sun WorkShop C++ [SVN r13855]
This commit is contained in:
@ -307,13 +307,13 @@ namespace boost {
|
|||||||
public: // should be protected, but GCC 2.95.3 will fail to allow access
|
public: // should be protected, but GCC 2.95.3 will fail to allow access
|
||||||
detail::function::any_pointer (*manager)(
|
detail::function::any_pointer (*manager)(
|
||||||
detail::function::any_pointer,
|
detail::function::any_pointer,
|
||||||
|
detail::function::functor_manager_operation_type);
|
||||||
|
detail::function::any_pointer functor;
|
||||||
|
|
||||||
#if (defined __SUNPRO_CC) && (__SUNPRO_CC <= 0x530) && !(defined BOOST_NO_COMPILER_CONFIG)
|
#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
|
// Sun C++ 5.3 can't handle the safe_bool idiom, so don't use it
|
||||||
operator bool () const { return !this->empty(); }
|
operator bool () const { return !this->empty(); }
|
||||||
#else
|
#else
|
||||||
detail::function::functor_manager_operation_type);
|
|
||||||
detail::function::any_pointer functor;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct dummy {
|
struct dummy {
|
||||||
void nonnull() {};
|
void nonnull() {};
|
||||||
@ -324,10 +324,10 @@ namespace boost {
|
|||||||
public:
|
public:
|
||||||
operator safe_bool () const
|
operator safe_bool () const
|
||||||
{ return (this->empty())? 0 : &dummy::nonnull; }
|
{ return (this->empty())? 0 : &dummy::nonnull; }
|
||||||
#endif
|
|
||||||
|
|
||||||
safe_bool operator!() const
|
safe_bool operator!() const
|
||||||
{ return (this->empty())? &dummy::nonnull : 0; }
|
{ return (this->empty())? &dummy::nonnull : 0; }
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Poison comparison between Boost.Function objects (because it is
|
/* Poison comparison between Boost.Function objects (because it is
|
||||||
|
Reference in New Issue
Block a user