File indexing completed on 2025-01-18 09:52:35
0001 #ifndef BOOST_SYSTEM_DETAIL_SYSTEM_CATEGORY_IMPL_HPP_INCLUDED
0002 #define BOOST_SYSTEM_DETAIL_SYSTEM_CATEGORY_IMPL_HPP_INCLUDED
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #include <boost/system/detail/system_category.hpp>
0014 #include <boost/system/detail/system_category_message.hpp>
0015 #include <boost/system/detail/error_condition.hpp>
0016 #include <boost/system/api_config.hpp>
0017
0018 #if !defined(BOOST_POSIX_API) && !defined(BOOST_WINDOWS_API)
0019 # error BOOST_POSIX_API or BOOST_WINDOWS_API must be defined
0020 #endif
0021
0022
0023
0024 #if defined(BOOST_WINDOWS_API)
0025
0026 #include <boost/system/detail/system_category_condition_win32.hpp>
0027
0028 inline boost::system::error_condition boost::system::detail::system_error_category::default_error_condition( int ev ) const BOOST_NOEXCEPT
0029 {
0030 int e2 = system_category_condition_win32( ev );
0031
0032 if( e2 == -1 )
0033 {
0034 return error_condition( ev, *this );
0035 }
0036 else
0037 {
0038 return error_condition( boost::system::detail::generic_value_tag( e2 ) );
0039 }
0040 }
0041
0042 #else
0043
0044 inline boost::system::error_condition boost::system::detail::system_error_category::default_error_condition( int ev ) const BOOST_NOEXCEPT
0045 {
0046 return error_condition( boost::system::detail::generic_value_tag( ev ) );
0047 }
0048
0049 #endif
0050
0051 inline std::string boost::system::detail::system_error_category::message( int ev ) const
0052 {
0053 return system_error_category_message( ev );
0054 }
0055
0056 inline char const * boost::system::detail::system_error_category::message( int ev, char * buffer, std::size_t len ) const BOOST_NOEXCEPT
0057 {
0058 return system_error_category_message( ev, buffer, len );
0059 }
0060
0061 #endif