]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/system/error_code.hpp
c34c2c0b3ef531b05aebd6d1309a59b98338eccf
[ceph.git] / ceph / src / boost / boost / system / error_code.hpp
1 #ifndef BOOST_SYSTEM_ERROR_CODE_HPP_INCLUDED
2 #define BOOST_SYSTEM_ERROR_CODE_HPP_INCLUDED
3
4 // Copyright Beman Dawes 2006, 2007
5 // Copyright Christoper Kohlhoff 2007
6 // Copyright Peter Dimov 2017, 2018
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/error_code.hpp>
14 #include <boost/system/error_category.hpp>
15 #include <boost/system/error_condition.hpp>
16 #include <boost/system/errc.hpp>
17 #include <boost/system/generic_category.hpp>
18 #include <boost/system/system_category.hpp>
19 #include <boost/system/detail/throws.hpp>
20 #include <boost/config.hpp>
21
22 namespace boost
23 {
24
25 namespace system
26 {
27
28 // non-member functions of error_code and error_condition
29
30 inline bool operator==( const error_code & code, const error_condition & condition ) BOOST_NOEXCEPT
31 {
32 return code.category().equivalent( code.value(), condition ) || condition.category().equivalent( code, condition.value() );
33 }
34
35 inline bool operator!=( const error_code & lhs, const error_condition & rhs ) BOOST_NOEXCEPT
36 {
37 return !( lhs == rhs );
38 }
39
40 inline bool operator==( const error_condition & condition, const error_code & code ) BOOST_NOEXCEPT
41 {
42 return code.category().equivalent( code.value(), condition ) || condition.category().equivalent( code, condition.value() );
43 }
44
45 inline bool operator!=( const error_condition & lhs, const error_code & rhs ) BOOST_NOEXCEPT
46 {
47 return !( lhs == rhs );
48 }
49
50 } // namespace system
51
52 } // namespace boost
53
54 #endif // BOOST_SYSTEM_ERROR_CODE_HPP_INCLUDED