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 を提供します。 それ以外のすべての型に対しては、 value
は false です。
このテンプレートは型が 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_type
|
bool
|
type
|
std::integral_constant<bool, value> |
[編集] 関連項目
(C++11) |
std::error_condition としての列挙型を識別します (クラステンプレート) |