std::is_error_condition_enum
来自cppreference.com
< cpp | error | error condition
工具库
诊断库
|
|
std::error_condition
成员函数 | ||||
非成员函数 | ||||
(C++20
前)(C++20
前)(C++20)
|
||||
辅助类 | ||||
is_error_condition_enum
|
||||
在标头
<system_error>
定义
|
||
template<
class T
>
struct is_error_condition_enum; |
(C++11 起) | |
若 T
是错误条件枚举,则此模板提供等于 true 的成员常量
value
。对于任何其他类型, value
为 false 。
此模板可以为用户定义类型特化,以指示该类型适合于 std::error_condition 自动转换。
标准库的下列类是错误条件枚举: std::errc 。
帮助变量模板
template<
class T
>
inline constexpr bool is_error_condition_enum_v = is_error_condition_enum<T>::value; |
(C++17 起) | |
继承自 std::integral_constant
成员常量
value
[静态]
|
如果 T 是错误条件枚举那么是 true,否则是
false
(公开静态成员常量) |
成员函数
operator
bool
|
将对象转换到 bool,返回
value
(公开成员函数) |
operator()
(C++14)
|
返回 value
(公开成员函数) |
成员类型
类型 | 定义 |
value_type
|
bool |
type
|
std::integral_constant<bool, value> |
参阅
(C++11)
|
鉴别类是否可作为 error_code 枚举 (类模板) |