命名空间
变体
操作

std::error_category::default_error_condition

来自 cppreference.cn
< cpp‎ | 错误‎ | 错误类别
 
 
 
 
 
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 - 要返回错误条件的错误值

[编辑] 返回值

给定错误代码的错误条件。