首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

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比较lhsrhs为了平等。

2%29比较lhsrhs为了平等。

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)

代码语言:txt
复制
 ? cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com