首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

std::is_error_code_enum

Defined in header <system_error>

template< class T > struct is_error_code_enum;

(since C++11)

如果T是错误代码枚举,此模板提供成员常量。value平等true.对于任何其他类型,valuefalse...

此模板可专门用于用户定义的类型,以指示该类型符合下列条件:std::error_codestd::error_condition自动转换

标准库的下列类是错误代码枚举:

  • std::io_errc
  • std::future_errc...

辅助变量模板

template< class T > inline constexpr bool is_error_code_enum_v = is_error_code_enum<T>::value;

(since C++17)

继承自STD:积分[医]常量

成员常数

value static

true if T is an error code enum, false otherwise (public static member constant)

成员函数

operator bool

converts the object to bool, returns value (public member function)

operator() (C++14)

returns value (public member function)

成员类型

Type

Definition

value_type

bool

type

std::integral_constant<bool, value>

另见

is_error_condition_enum (C++11)

identifies an enumeration as an std::error_condition (class template)

代码语言:txt
复制
 © cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

扫码关注腾讯云开发者

领取腾讯云代金券