From ff77d4c094f89c88d48ae71d1aec38317560aeed Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sat, 12 Jun 2021 21:59:22 +0300 Subject: [PATCH] Do not call generic_category() in system_error_category --- .../boost/system/detail/system_category_impl.hpp | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/include/boost/system/detail/system_category_impl.hpp b/include/boost/system/detail/system_category_impl.hpp index 544438e..8f6002c 100644 --- a/include/boost/system/detail/system_category_impl.hpp +++ b/include/boost/system/detail/system_category_impl.hpp @@ -12,9 +12,7 @@ #include #include -#include #include -#include #if !defined(BOOST_POSIX_API) && !defined(BOOST_WINDOWS_API) # error BOOST_POSIX_API or BOOST_WINDOWS_API must be defined @@ -37,7 +35,7 @@ inline boost::system::error_condition boost::system::detail::system_error_catego } else { - return error_condition( e2, generic_category() ); + return error_condition( boost::system::detail::generic_value_tag( e2 ) ); } } @@ -54,18 +52,10 @@ inline char const * boost::system::detail::system_error_category::message( int e #else // #if defined(BOOST_WINDOWS_API) #include -#include inline boost::system::error_condition boost::system::detail::system_error_category::default_error_condition( int ev ) const BOOST_NOEXCEPT { - if( is_generic_value( ev ) ) - { - return error_condition( ev, generic_category() ); - } - else - { - return error_condition( ev, *this ); - } + return error_condition( boost::system::detail::generic_value_tag( ev ) ); } inline std::string boost::system::detail::system_error_category::message( int ev ) const