Namespaces
Variants

std::meta::enumerators_of

From cppreference.com
< cpp | meta
 
 
 
Reflection library
 
Reflection types and queries
Reflection queries
Reflection layout queries
Type properties
Type property queries
 
Defined in header <meta>
consteval std::vector<std::meta::info> enumerators_of( std::meta::info type_enum );
(since C++26)

Returns a std::vector containing reflections of enumerators of the enumeration type represented by type_enum, in the order in which they are declared.

Parameters

type_enum - a reflection of an enumeration type

Return value

A vector containing the reflections of enumerators, as described above.

Exceptions

Throws std::meta::exception unless std::meta::dealias(type_enum) represents an enumeration type, and std::meta::is_enumerable(type_enum) is true.

Example

See also

checks if the reflected type has its list of members completely defined
(function) [edit]
checks if reflection represents an enumerator
(function) [edit]