名前空間
変種
操作

std::is_error_code_enum

提供: cppreference.com
< cpp‎ | error‎ | error code
 
 
ユーティリティライブラリ
 
 
 
ヘッダ <system_error> で定義
template< class T >
struct is_error_code_enum;
(C++11以上)

T がエラーコードの列挙型であれば、このテンプレートは true に等しいメンバ定数 value を提供します。 それ以外のすべての型に対しては、 valuefalse です。

このテンプレートは型が std::error_code およぼ std::error_condition の自動変換に対して適格であることを示すためにユーザ定義の型に対して特殊化しても構いません。

標準ライブラリの以下のクラスはエラーコードの列挙型です。

目次

ヘルパー変数テンプレート

template< class T >
inline constexpr bool is_error_code_enum_v = is_error_code_enum<T>::value;
(C++17以上)

std::integral_constant から継承

メンバ定数

value
[静的]
T がエラーコードの列挙型であるならば true、そうでなければ false
(パブリック静的メンバ定数)

メンバ関数

operator bool
オブジェクトを bool に変換します。 value を返します
(パブリックメンバ関数)
operator()
(C++14)
value を返します
(パブリックメンバ関数)

メンバ型

定義
value_typebool
typestd::integral_constant<bool, value>

関連項目

std::error_condition としての列挙型を識別します
(クラステンプレート) [edit]