1 #ifndef BOOST_SYSTEM_ERROR_CODE_HPP_INCLUDED
2 #define BOOST_SYSTEM_ERROR_CODE_HPP_INCLUDED
4 // Copyright Beman Dawes 2006, 2007
5 // Copyright Christoper Kohlhoff 2007
6 // Copyright Peter Dimov 2017, 2018
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)
11 // See library home page at http://www.boost.org/libs/system
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>
28 // non-member functions of error_code and error_condition
30 inline bool operator==( const error_code & code, const error_condition & condition ) BOOST_NOEXCEPT
32 return code.category().equivalent( code.value(), condition ) || condition.category().equivalent( code, condition.value() );
35 inline bool operator!=( const error_code & lhs, const error_condition & rhs ) BOOST_NOEXCEPT
37 return !( lhs == rhs );
40 inline bool operator==( const error_condition & condition, const error_code & code ) BOOST_NOEXCEPT
42 return code.category().equivalent( code.value(), condition ) || condition.category().equivalent( code, condition.value() );
45 inline bool operator!=( const error_condition & lhs, const error_code & rhs ) BOOST_NOEXCEPT
47 return !( lhs == rhs );
54 #endif // BOOST_SYSTEM_ERROR_CODE_HPP_INCLUDED