diff --git a/include/boost/system/error_code.hpp b/include/boost/system/error_code.hpp index 7729049..3bce6ef 100644 --- a/include/boost/system/error_code.hpp +++ b/include/boost/system/error_code.hpp @@ -12,7 +12,6 @@ #include #include -#include #include #include #include @@ -355,6 +354,22 @@ static const error_category & native_ecat BOOST_ATTRIBUTE_UNUSED = system_catego #endif +// enable_if + +namespace detail +{ + +template struct enable_if +{ + typedef T type; +}; + +template struct enable_if +{ +}; + +} // namespace detail + // class error_condition // error_conditions are portable, error_codes are system or library specific @@ -379,7 +394,7 @@ public: } template BOOST_SYSTEM_CONSTEXPR error_condition( ErrorConditionEnum e, - typename boost::enable_if_::value>::type* = 0) BOOST_NOEXCEPT + typename detail::enable_if::value>::type* = 0) BOOST_NOEXCEPT { *this = make_error_condition( e ); } @@ -393,7 +408,7 @@ public: } template - BOOST_SYSTEM_CONSTEXPR typename boost::enable_if_::value, error_condition>::type & + BOOST_SYSTEM_CONSTEXPR typename detail::enable_if::value, error_condition>::type & operator=( ErrorConditionEnum val ) BOOST_NOEXCEPT { *this = make_error_condition( val ); @@ -499,8 +514,8 @@ public: { } - template BOOST_SYSTEM_CONSTEXPR error_code( ErrorCodeEnum e, - typename boost::enable_if_::value>::type* = 0 ) BOOST_NOEXCEPT + template BOOST_SYSTEM_CONSTEXPR error_code( ErrorCodeEnum e, + typename detail::enable_if::value>::type* = 0 ) BOOST_NOEXCEPT { *this = make_error_code( e ); } @@ -514,7 +529,7 @@ public: } template - BOOST_SYSTEM_CONSTEXPR typename boost::enable_if_::value, error_code>::type & + BOOST_SYSTEM_CONSTEXPR typename detail::enable_if::value, error_code>::type & operator=( ErrorCodeEnum val ) BOOST_NOEXCEPT { *this = make_error_code( val );