mirror of
https://github.com/boostorg/system.git
synced 2025-07-30 12:37:13 +02:00
Resolve ambiguity for std::error_code == boost::system::error_condition
This commit is contained in:
@ -198,6 +198,26 @@ public:
|
|||||||
return std::error_condition( value(), category() );
|
return std::error_condition( value(), category() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline friend bool operator==( std::error_code const & lhs, error_condition const & rhs ) BOOST_NOEXCEPT
|
||||||
|
{
|
||||||
|
return lhs == static_cast< std::error_condition >( rhs );
|
||||||
|
}
|
||||||
|
|
||||||
|
inline friend bool operator==( error_condition const & lhs, std::error_code const & rhs ) BOOST_NOEXCEPT
|
||||||
|
{
|
||||||
|
return static_cast< std::error_condition >( lhs ) == rhs;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline friend bool operator!=( std::error_code const & lhs, error_condition const & rhs ) BOOST_NOEXCEPT
|
||||||
|
{
|
||||||
|
return !( lhs == rhs );
|
||||||
|
}
|
||||||
|
|
||||||
|
inline friend bool operator!=( error_condition const & lhs, std::error_code const & rhs ) BOOST_NOEXCEPT
|
||||||
|
{
|
||||||
|
return !( lhs == rhs );
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user