diff --git a/include/boost/system/detail/error_category_impl.hpp b/include/boost/system/detail/error_category_impl.hpp index af2185a..252f845 100644 --- a/include/boost/system/detail/error_category_impl.hpp +++ b/include/boost/system/detail/error_category_impl.hpp @@ -92,4 +92,17 @@ inline char const * error_category::message( int ev, char * buffer, std::size_t } // namespace boost +// interoperability with std::error_code, std::error_condition + +#if defined(BOOST_SYSTEM_HAS_SYSTEM_ERROR) + +#include + +inline boost::system::error_category::operator std::error_category const & () const +{ + return boost::system::detail::to_std_category( *this ); +} + +#endif // #if defined(BOOST_SYSTEM_HAS_SYSTEM_ERROR) + #endif // #ifndef BOOST_SYSTEM_DETAIL_ERROR_CATEGORY_IMPL_HPP_INCLUDED diff --git a/include/boost/system/error_code.hpp b/include/boost/system/error_code.hpp index de95b13..5ef7ae5 100644 --- a/include/boost/system/error_code.hpp +++ b/include/boost/system/error_code.hpp @@ -140,17 +140,4 @@ inline char const * boost::system::detail::system_error_category::message( int e #endif // #if defined(BOOST_WINDOWS_API) -// interoperability with std::error_code, std::error_condition - -#if defined(BOOST_SYSTEM_HAS_SYSTEM_ERROR) - -#include - -inline boost::system::error_category::operator std::error_category const & () const -{ - return boost::system::detail::to_std_category( *this ); -} - -#endif // #if defined(BOOST_SYSTEM_HAS_SYSTEM_ERROR) - #endif // BOOST_SYSTEM_ERROR_CODE_HPP_INCLUDED