File indexing completed on 2025-01-18 09:53:28
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef BOOST_URL_IMPL_ERROR_HPP
0011 #define BOOST_URL_IMPL_ERROR_HPP
0012
0013 #include <type_traits>
0014
0015 namespace boost {
0016
0017
0018 namespace system {
0019 template<>
0020 struct is_error_code_enum<::boost::urls::error>
0021 {
0022 static bool const value = true;
0023 };
0024 }
0025
0026
0027 namespace urls {
0028
0029 namespace detail {
0030
0031 struct BOOST_SYMBOL_VISIBLE
0032 error_cat_type
0033 : system::error_category
0034 {
0035 BOOST_URL_DECL
0036 const char* name(
0037 ) const noexcept override;
0038
0039 BOOST_URL_DECL
0040 std::string message(
0041 int) const override;
0042
0043 BOOST_URL_DECL
0044 char const* message(
0045 int, char*, std::size_t
0046 ) const noexcept override;
0047
0048 BOOST_URL_DECL
0049 system::error_condition
0050 default_error_condition(
0051 int code) const noexcept override;
0052
0053 BOOST_SYSTEM_CONSTEXPR error_cat_type() noexcept
0054 : error_category(0xbc15399d7a4ce829)
0055 {
0056 }
0057 };
0058
0059 BOOST_URL_DECL extern
0060 error_cat_type error_cat;
0061
0062 }
0063
0064 inline
0065 BOOST_SYSTEM_CONSTEXPR
0066 system::error_code
0067 make_error_code(
0068 error ev) noexcept
0069 {
0070 return system::error_code{
0071 static_cast<std::underlying_type<
0072 error>::type>(ev),
0073 detail::error_cat};
0074 }
0075
0076 }
0077 }
0078
0079 #endif