std::error_category::default_error_condition
来自 cppreference.cn
< cpp | error | error category
virtual std::error_condition default_error_condition( int val ) const noexcept; |
(自 C++11 起) | |
返回给定错误值的错误条件。
等价于 std::error_condition(val, *this)。
派生自 error_category
的类可以重写此函数,以将某些错误值映射到通用类别。例如,std::system_category 重写此函数,以将匹配 POSIX errno 值的错误值映射到 std::generic_category。
[编辑] 参数
val | - | 要为其返回错误条件的错误值 |
[编辑] 返回值
给定错误代码的错误条件。