1 #ifndef BOOST_SYSTEM_DETAIL_IS_GENERIC_VALUE_HPP_INCLUDED
2 #define BOOST_SYSTEM_DETAIL_IS_GENERIC_VALUE_HPP_INCLUDED
4 // Copyright 2018 Peter Dimov
6 // Distributed under the Boost Software License, Version 1.0. (See accompanying
7 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
9 // See library home page at http://www.boost.org/libs/system
11 #include <boost/system/detail/errc.hpp>
22 inline bool is_generic_value( int ev ) BOOST_NOEXCEPT
26 static int const gen[] =
29 address_family_not_supported,
31 address_not_available,
33 argument_list_too_long,
34 argument_out_of_domain,
40 connection_already_in_progress,
44 destination_address_required,
45 device_or_resource_busy,
47 executable_format_error,
51 function_not_supported,
54 illegal_byte_sequence,
55 inappropriate_io_control_operation,
74 no_such_device_or_address,
76 no_such_file_or_directory,
85 operation_in_progress,
86 operation_not_permitted,
87 operation_not_supported,
88 operation_would_block,
92 protocol_not_supported,
93 read_only_file_system,
94 resource_deadlock_would_occur,
95 resource_unavailable_try_again,
97 state_not_recoverable,
101 too_many_files_open_in_system,
104 too_many_symbolic_link_levels,
109 int const n = sizeof( gen ) / sizeof( gen[0] );
111 for( int i = 0; i < n; ++i )
113 if( ev == gen[ i ] ) return true;
119 } // namespace detail
121 } // namespace system
125 #endif // #ifndef BOOST_SYSTEM_DETAIL_IS_GENERIC_VALUE_HPP_INCLUDED