operators (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) |
比较两种错误条件。
1-2%29检查lhs
和rhs
是平等的。
3-4%29次检查lhs
和rhs
不平等。
5%29检查是否lhs
是少于rhs
...
参数
lhs, rhs | - | error conditions to compare |
---|
返回值
1%29true
如果错误类别和错误值比较相等。
2%29true
如果lhs.category().equivalent(lhs.value(), rhs)
或rhs.category().equivalent(lhs, rhs.value())
是true
...
3%29true
如果错误类别或错误值比较不相等。
4%29true
如果lhs.category().equivalent(lhs.value(), rhs)
和rhs.category().equivalent(lhs, rhs.value())
都是false
...
5%29true
如果lhs.category() < rhs.category()
.否则,true
如果lhs.category() == rhs.category() && lhs.value() < rhs.value()
.否则,false
...
例外
noexcept
规格:
noexcept
© cppreference.com
在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。
本文档系腾讯云开发者社区成员共同维护,如有问题请联系 cloudcommunity@tencent.com