std::error_category::equivalent
STD:错误[医]类别:等价物
virtual bool equivalent( int code, const std::error_condition& condition ) const; | (1) | (since C++11) |
---|---|---|
virtual bool equivalent( const std::error_code& code, int condition ) const; | (2) | (since C++11) |
表示的错误类别的错误代码是否等效于错误条件。*this
...
1%29相当于default_error_condition(code) == condition
...
2%29相当于*this == code.category() && code.value() == condition
...
参数
code | - | specifies the error code to compare |
---|---|---|
condition | - | specifies the error condition to compare |
返回值
true
表示的错误类别的错误代码等效于给定的错误条件。*this
,,,false
否则。
例外
noexcept
规格:
noexcept
© cppreference.com
在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。