std::operators (std::error_code)
Defined in header <system_error> | | |
|---|---|---|
bool operator==( const error_code& lhs, const error_code& rhs ); | (1) | (since C++11) |
bool operator!=( const error_code& lhs, const error_code& rhs ); | (1) | (since C++11) |
bool operator<( const error_code& lhs, const error_code& rhs ); | (1) | (since C++11) |
比较两个错误代码对象。
1%29比较lhs和rhs为了平等。
2%29比较lhs和rhs为了平等。
3%29检查是否lhs小于rhs...
参数
lhs, rhs | - | error codes to compare |
|---|
返回值
1%29true如果错误类别和错误值比较相等。
2%29true如果错误类别或错误值比较不相等。
3%29true如果lhs.category() < rhs.category().否则,true如果lhs.category() == rhs.category() && lhs.value() < rhs.value().否则,false
例外
noexcept规格:
noexcept
另见
category | obtains the error_category for this error_code (public member function) |
|---|
© cppreference.com在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。
本文档系腾讯云开发者社区成员共同维护,如有问题请联系 cloudcommunity@tencent.com

