forked from boostorg/core
explicit_operator_bool: fix g++ 4.6 workaround
This commit is contained in:
@ -53,6 +53,8 @@
|
|||||||
return !this->operator! ();\
|
return !this->operator! ();\
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !BOOST_WORKAROUND(BOOST_GCC, < 40700)
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief The macro defines a constexpr explicit operator of conversion to \c bool
|
* \brief The macro defines a constexpr explicit operator of conversion to \c bool
|
||||||
*
|
*
|
||||||
@ -66,6 +68,12 @@
|
|||||||
return !this->operator! ();\
|
return !this->operator! ();\
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#define BOOST_CONSTEXPR_EXPLICIT_OPERATOR_BOOL() BOOST_EXPLICIT_OPERATOR_BOOL_NOEXCEPT()
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#else // !defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS)
|
#else // !defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS)
|
||||||
|
|
||||||
#if (defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x530)) && !defined(BOOST_NO_COMPILER_CONFIG)
|
#if (defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x530)) && !defined(BOOST_NO_COMPILER_CONFIG)
|
||||||
@ -122,20 +130,12 @@ namespace detail {
|
|||||||
return (!this->operator! () ? &boost::detail::unspecified_bool::true_value : (boost::detail::unspecified_bool_type)0);\
|
return (!this->operator! () ? &boost::detail::unspecified_bool::true_value : (boost::detail::unspecified_bool_type)0);\
|
||||||
}
|
}
|
||||||
|
|
||||||
#if BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40700)
|
|
||||||
|
|
||||||
#define BOOST_CONSTEXPR_EXPLICIT_OPERATOR_BOOL() BOOST_EXPLICIT_OPERATOR_BOOL_NOEXCEPT()
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
#define BOOST_CONSTEXPR_EXPLICIT_OPERATOR_BOOL()\
|
#define BOOST_CONSTEXPR_EXPLICIT_OPERATOR_BOOL()\
|
||||||
BOOST_FORCEINLINE BOOST_CONSTEXPR operator boost::detail::unspecified_bool_type () const BOOST_NOEXCEPT\
|
BOOST_FORCEINLINE BOOST_CONSTEXPR operator boost::detail::unspecified_bool_type () const BOOST_NOEXCEPT\
|
||||||
{\
|
{\
|
||||||
return (!this->operator! () ? &boost::detail::unspecified_bool::true_value : (boost::detail::unspecified_bool_type)0);\
|
return (!this->operator! () ? &boost::detail::unspecified_bool::true_value : (boost::detail::unspecified_bool_type)0);\
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#else // !defined(BOOST_NO_UNSPECIFIED_BOOL)
|
#else // !defined(BOOST_NO_UNSPECIFIED_BOOL)
|
||||||
|
|
||||||
#define BOOST_EXPLICIT_OPERATOR_BOOL()\
|
#define BOOST_EXPLICIT_OPERATOR_BOOL()\
|
||||||
|
Reference in New Issue
Block a user