Namespaces
Variants

std::error_category::default_error_condition

来自 zh.cppreference.net
 
 
 
 
 
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 - 返回错误条件的错误值

返回值

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