std::operator==,!=,<(std::error_code) (3) - Linux Manuals

std::operator==,!=,<(std::error_code): std::operator==,!=,<(std::error_code)

NAME

std::operator==,!=,<(std::error_code) - std::operator==,!=,<(std::error_code)

Synopsis


Defined in header <system_error>
bool operator==( const error_code& lhs, const error_code& rhs ) noexcept; (1) (since C++11)
bool operator!=( const error_code& lhs, const error_code& rhs ) noexcept; (1) (since C++11)
bool operator<( const error_code& lhs, const error_code& rhs ) noexcept; (1) (since C++11)


Compares two error code objects.
1) Compares lhs and rhs for equality.
2) Compares lhs and rhs for equality.
3) Checks whether lhs is less than rhs.

Parameters


lhs, rhs - error codes to compare

Return value


1) true if the error category and error value compare equal.
2) true if the error category or error value compare are not equal.
3) true if lhs.category() < rhs.category(). Otherwise, true if lhs.category() == rhs.category() && lhs.value() < rhs.value(). Otherwise, false

See also


           obtains the error_category for this error_code
category (public member function)
           obtains the value of the error_code
value (public member function)


operator== compares error_conditions and error_codes
operator!= (function)
operator<