namespace std::meta {
consteval bool is_enumerable_type(info r);
}
概要
型が列挙可能型であるかを判定する。列挙可能型とは、enumerators_of()で列挙子を取得できる列挙型である。
戻り値
rが列挙可能な列挙型を表す場合にtrueを返す。
例
#include <meta>
enum Color { red, green, blue };
int main() {
static_assert(std::meta::is_enumerable_type(^^Color));
}
出力
バージョン
言語
- C++26
処理系
- Clang: ??
- GCC: 16 (
-freflectionオプション指定) ✅ - Visual C++: ??