std::error_category:: default_error_condition
From cppreference.net
<
cpp
|
error
|
error category
C++
Utilities library
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Diagnostics library
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::error_category
| Member functions | ||||
|
error_category::default_error_condition
|
||||
|
(until C++20)
(until C++20)
(C++20)
|
|
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 | - | 返回错误条件的错误值 |
返回值
给定错误代码的错误条件。