std::meta::is_enumerator
Defined in header <meta> | ||
|---|---|---|
consteval bool is_enumerator( std::meta::info r ); | (since C++26) |
Returns true if r represents an enumerator. Otherwise returns false.
Parameters
| r | - | a reflection value |
Return value
true if r represents an enumerator; otherwise false.
Example
#include <meta>
enum E { e };
static_assert( std::meta::is_enumerator(^^e));
static_assert(!std::meta::is_enumerator(^^E));
static_assert( std::meta::is_enum_type(^^E));
int main() {}
See also
|
(C++11) | checks if a type is an enumeration type (class template) |
|
(C++23) | checks if a type is a scoped enumeration type (class template) |
|
(C++26) | checks if reflected type is an enumeration type (function) |
|
(C++26) | checks if reflection represents a scoped enumeration type (function) |
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/cpp/meta/is_enumerator