function
<system_error>
std::relational operators (error_code)
| vs error_code(1) | bool operator== (const error_code& lhs, const error_code& rhs) noexcept;bool operator!= (const error_code& lhs, const error_code& rhs) noexcept;bool operator< (const error_code& lhs, const error_code& rhs) noexcept; |
|---|---|
| vs error_condition(2) | bool operator== (const error_code& lhs, const error_condition& rhs) noexcept;bool operator== (const error_condition& lhs, const error_code& rhs) noexcept;bool operator!= (const error_code& lhs, const error_condition& rhs) noexcept;bool operator!= (const error_condition& lhs, const error_code& rhs) noexcept; |
Relational operators
When the comparison involves two objects of type error_code:
- if they are of the same category, the function returns the result of applying the appropriate operator (
==,!=,<) on their associated values. - otherwise, the function returns the result of applying the operator (
==,!=,<) to their categories.
If the operation involves an error_code object and an error_condition object, the function calls to error_category::equivalent to determine whether they are equivalent.
These functions behave as if defined as:
|
|
Parameters
- lhs, rhs
- Objects (to the left- and right-hand side of the operator, respectively).
Return value
true if the condition holds, and false otherwise.See also
- error_code::value
- Error value (public member function)