/src/boost/boost/system/errc.hpp
Line | Count | Source |
1 | | #ifndef BOOST_SYSTEM_ERRC_HPP_INCLUDED |
2 | | #define BOOST_SYSTEM_ERRC_HPP_INCLUDED |
3 | | |
4 | | // Copyright Beman Dawes 2006, 2007 |
5 | | // Copyright Christoper Kohlhoff 2007 |
6 | | // Copyright Peter Dimov 2017, 2018, 2020 |
7 | | // |
8 | | // Distributed under the Boost Software License, Version 1.0. (See accompanying |
9 | | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
10 | | // |
11 | | // See library home page at http://www.boost.org/libs/system |
12 | | |
13 | | #include <boost/system/detail/errc.hpp> |
14 | | #include <boost/system/detail/error_code.hpp> |
15 | | #include <boost/system/detail/error_condition.hpp> |
16 | | #include <boost/system/detail/generic_category.hpp> |
17 | | #include <boost/system/detail/error_category_impl.hpp> |
18 | | #include <boost/system/detail/config.hpp> |
19 | | #include <boost/assert/source_location.hpp> |
20 | | #include <boost/config.hpp> |
21 | | |
22 | | namespace boost |
23 | | { |
24 | | |
25 | | namespace system |
26 | | { |
27 | | |
28 | | // make_* functions for errc::errc_t |
29 | | |
30 | | namespace errc |
31 | | { |
32 | | |
33 | | // explicit conversion: |
34 | | BOOST_SYSTEM_CONSTEXPR inline error_code make_error_code( errc_t e ) noexcept |
35 | 0 | { |
36 | 0 | return error_code( e, generic_category() ); |
37 | 0 | } |
38 | | |
39 | | // explicit conversion: |
40 | | inline error_code make_error_code( errc_t e, boost::source_location const * loc ) noexcept |
41 | 0 | { |
42 | 0 | return error_code( e, generic_category(), loc ); |
43 | 0 | } |
44 | | |
45 | | // implicit conversion: |
46 | | BOOST_SYSTEM_CONSTEXPR inline error_condition make_error_condition( errc_t e ) noexcept |
47 | 0 | { |
48 | 0 | return error_condition( e, generic_category() ); |
49 | 0 | } |
50 | | |
51 | | } // namespace errc |
52 | | |
53 | | } // namespace system |
54 | | |
55 | | } // namespace boost |
56 | | |
57 | | #endif // #ifndef BOOST_SYSTEM_ERRC_HPP_INCLUDED |