operators (std::error_condition)

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

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

Compares two error conditions.

1-2) Checks whether lhs and rhs are equal.
3-4) Checks whether lhs and rhs are not equal.
5) Checks whether lhs is less than rhs.

Parameters

lhs, rhs - error conditions to compare

Return value

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

Exceptions

noexcept specification:
noexcept

© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
http://en.cppreference.com/w/cpp/error/error_condition/operator_cmp

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部