Move op!= for error_condition

This commit is contained in:
Peter Dimov
2020-08-27 02:26:32 +03:00
parent abc94afdb2
commit 13bac420ab
2 changed files with 7 additions and 5 deletions

View File

@ -14,6 +14,8 @@
#include <boost/system/detail/generic_category.hpp>
#include <boost/system/detail/enable_if.hpp>
#include <boost/system/is_error_condition_enum.hpp>
#include <boost/system/detail/config.hpp>
#include <boost/config.hpp>
namespace boost
{
@ -152,6 +154,11 @@ public:
#endif
};
BOOST_SYSTEM_CONSTEXPR inline bool operator!=( const error_condition & lhs, const error_condition & rhs ) BOOST_NOEXCEPT
{
return !( lhs == rhs );
}
} // namespace system
} // namespace boost

View File

@ -87,11 +87,6 @@ inline system::error_code& throws()
namespace system
{
BOOST_SYSTEM_CONSTEXPR inline bool operator!=( const error_condition & lhs, const error_condition & rhs ) BOOST_NOEXCEPT
{
return !( lhs == rhs );
}
inline bool operator==( const error_code & code, const error_condition & condition ) BOOST_NOEXCEPT
{
return code.category().equivalent( code.value(), condition ) || condition.category().equivalent( code, condition.value() );