Namespaces
Views
std::meta::is_enumerator
From cppreference.com
C++
Reflection library
Reflection types and queries
| 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.
Contents
Parameters
| r | - | a reflection value |
Return value
true if r represents an enumerator; otherwise false.
Example
Run this code
#include <meta>
enum E { e };
static_assert(std::meta::is_enumerator(^^e));
static_assert(!std::meta::is_enumerator(^^E));
int main() {}
See also
(C++11) |
checks if a type is an enumeration type (class template) [edit] |
(C++26) |
checks if reflected type is an enumeration type (function) [edit] |
