GMP 0.4.0
Generative Metaprogramming library for C++
Loading...
Searching...
No Matches
Reflection Metaprogramming

Compile-time enum, aggregate, type-name, and payload-size reflection utilities. More...

Concepts

concept  gmp::reflectable
 Constraint for aggregate types supported by the reflection helpers.
 

Classes

struct  gmp::enum_traits< E >
 Customize the reflection range or explicit values for an enumeration. More...
 
struct  gmp::pretty_type_name< T >
 Format a type name for documentation-friendly display. More...
 
struct  gmp::pretty_type_name< std::string >
 Formatter specialization for std::string. More...
 
struct  gmp::pretty_type_name< std::string_view >
 Formatter specialization for std::string_view. More...
 
struct  gmp::pretty_type_name< std::vector< T > >
 Formatter specialization for std::vector<T>. More...
 
struct  gmp::pretty_type_name< std::array< T, N > >
 Formatter specialization for std::array<T, N>. More...
 

Macros

#define GMP_ENUM_RANGE(Enum, Min, Max)
 Specialize gmp::enum_traits with an explicit scan range.
 
#define GMP_ENUM_VALUES(Enum, ...)
 Specialize gmp::enum_traits with an explicit enumerator list.
 

Typedefs

template<std::size_t I, typename T >
using gmp::member_type_t = std::remove_cvref_t< decltype(*detail::field_getter< I, T >(constant_arg< member_count< T >()>))>
 Alias for the type of the I-th member of an aggregate type.
 

Functions

template<typename E , fixed_string P = type_name<E>() + fixed_string("::")>
consteval auto gmp::enum_values ()
 Get all enumerator values of an enumeration type at compile-time.
 
template<typename E , fixed_string P = type_name<E>() + fixed_string("::")>
consteval auto gmp::enum_count ()
 Count the number of enumerators in an enumeration type at compile-time.
 
template<auto E, fixed_string P = fixed_string("::")>
consteval auto gmp::enum_name ()
 Get the name of an enumerator at compile-time.
 
template<typename E >
consteval auto gmp::enum_names ()
 Get all enumerator names of an enumeration type at compile-time.
 
template<typename E >
consteval auto gmp::enum_entries ()
 Get all enumerator entries (value, name) of an enumeration type at compile-time.
 
template<typename E >
constexpr auto gmp::enum_index (E value) -> std::optional< std::size_t >
 Get the index of an enumerator value in enum_values<E>().
 
template<typename E >
constexpr auto gmp::enum_cast (std::string_view name) -> std::optional< E >
 Cast an enumerator name to its corresponding enumerator value.
 
template<typename E >
requires std::is_enum_v<E>
constexpr auto gmp::enum_underlying (E value) noexcept -> std::underlying_type_t< E >
 Return the underlying integer value of an enumerator.
 
template<typename E >
requires std::is_enum_v<E>
constexpr bool gmp::enum_contains (E value)
 Test whether an enumerator is present in the reflected set.
 
template<typename E , typename U >
requires std::is_enum_v<E> && std::is_integral_v<U>
constexpr bool gmp::enum_contains (U value)
 Test whether an underlying integer value is a reflected enumerator.
 
template<typename T , typename... Args>
requires std::is_aggregate_v<std::remove_cvref_t<T>>
consteval int gmp::member_count ()
 Count the number of members in an aggregate type at compile-time.
 
template<std::size_t I, typename T >
requires std::is_aggregate_v<T> && (I < member_count<T>()) && (member_count<T>() <= GMP_MAX_SUPPORTED_FIELDS)
consteval auto gmp::member_name () noexcept
 Get the name of a specific member of an aggregate type at compile-time.
 
template<typename T >
consteval auto gmp::member_names ()
 Get all member names of an aggregate type at compile-time.
 
template<typename T >
requires reflectable<T>
constexpr auto gmp::member_index (std::string_view name) -> std::optional< std::size_t >
 Find a reflected member by name.
 
template<typename T >
requires reflectable<T>
constexpr bool gmp::has_member (std::string_view name)
 Test whether an aggregate has a reflected member with the given name.
 
template<typename T >
constexpr auto gmp::member_type_names ()
 Returns an array of string_view containing the type names of all members of aggregate type T.
 
template<std::size_t I, typename T , typename UnqualifiedT = std::remove_cvref_t<T>>
requires std::is_aggregate_v<UnqualifiedT> && (I < member_count<UnqualifiedT>()) && (member_count<UnqualifiedT>() <= GMP_MAX_SUPPORTED_FIELDS)
decltype(autogmp::member_ref (T &&value) noexcept
 Get a reference to the I-th member of an aggregate object.
 
template<typename T >
requires reflectable<T>
constexpr auto gmp::tie_members (T &value) noexcept
 Return a tuple of references to all members of an aggregate.
 
template<typename T , typename F >
requires reflectable<T>
constexpr decltype(autogmp::apply_members (T &value, F &&func) noexcept(noexcept(std::apply(std::forward< F >(func), tie_members(value))))
 Invoke a callable with all aggregate members as separate arguments.
 
template<typename T , typename F >
requires reflectable<T>
constexpr void gmp::for_each_member (T &&value, F &&func) noexcept(noexcept(detail::for_each_member_impl(std::forward< T >(value), std::forward< F >(func), std::make_index_sequence< member_count_v< std::remove_cvref_t< T > > >{})))
 Visit each member of an aggregate object together with its member name.
 
template<typename T , typename F >
requires reflectable<T>
constexpr bool gmp::visit_member (T &&value, std::string_view name, F &&func)
 Visit a member selected by name.
 
template<typename T >
consteval auto gmp::type_name ()
 Get the string representation of a type at compile-time.
 
template<typename T >
consteval std::size_t gmp::type_size ()
 Calculate the actual payload size of a type without aggregate padding.
 

Variables

template<typename E >
constexpr int gmp::enum_min_v
 The minimum reflection scan value for enumeration type E.
 
template<typename E >
constexpr int gmp::enum_max_v
 The maximum reflection scan value for enumeration type E.
 
template<typename T >
constexpr auto gmp::member_count_v
 Number of members in an aggregate type as an inline constant.
 

Detailed Description

Macro Definition Documentation

◆ GMP_ENUM_RANGE

#define GMP_ENUM_RANGE (   Enum,
  Min,
  Max 
)

This macro defines enum_traits<Enum>::min and enum_traits<Enum>::max, allowing enum reflection to scan a narrower or wider range than the default.

Parameters
EnumThe enumeration type to customize.
MinThe minimum integer value to scan.
MaxThe maximum integer value to scan.

Definition at line 64 of file meta.hpp.

◆ GMP_ENUM_VALUES

#define GMP_ENUM_VALUES (   Enum,
  ... 
)

This macro bypasses range scanning by providing the exact set of enumerator values to use for reflection.

Parameters
EnumThe enumeration type to customize.
...The explicit enumerator values of Enum.

Definition at line 81 of file meta.hpp.

Typedef Documentation

◆ member_type_t

template<std::size_t I, typename T >
gmp::member_type_t
Template Parameters
IZero-based member index.
TThe aggregate type to introspect.
Note
The resulting type is stripped of const, volatile, and reference qualifiers.
struct Point { int x; float y; };
using YType = member_type_t<1, Point>; // float
consteval auto enum_values()
Get all enumerator values of an enumeration type at compile-time.
Definition meta.hpp:193

Definition at line 686 of file meta.hpp.

Function Documentation

◆ apply_members()

template<typename T , typename F >
requires reflectable<T>
constexpr decltype(auto) gmp::apply_members ( T &  value,
F &&  func 
)
constexprnoexcept

Definition at line 798 of file meta.hpp.

References gmp::enum_values(), and gmp::tie_members().

◆ enum_cast()

template<typename E >
constexpr auto gmp::enum_cast ( std::string_view  name) -> std::optional<E>
constexpr
Template Parameters
EThe enumeration type to cast into.
Parameters
nameThe enumerator name to search for.
Returns
std::optional<E> containing the enumerator if found, otherwise std::nullopt.

Definition at line 399 of file meta.hpp.

References gmp::enum_values(), and gmp::name.

◆ enum_contains() [1/2]

template<typename E >
requires std::is_enum_v<E>
constexpr bool gmp::enum_contains ( E  value)
constexpr

Definition at line 423 of file meta.hpp.

References gmp::enum_index().

◆ enum_contains() [2/2]

template<typename E , typename U >
requires std::is_enum_v<E> && std::is_integral_v<U>
constexpr bool gmp::enum_contains ( U  value)
constexpr

Definition at line 432 of file meta.hpp.

References gmp::enum_underlying(), and gmp::enum_values().

◆ enum_count()

template<typename E , fixed_string P = type_name<E>() + fixed_string("::")>
consteval auto gmp::enum_count ( )
Template Parameters
EThe enumeration type to count enumerators for.
PThe prefix string used to identify enumerator names (defaults to type name + "::").
Returns
The number of valid enumerators in the enumeration.
Note
This function is consteval and evaluated entirely at compile-time.
enum class Color { Red, Green, Blue, Yellow };
enum class Empty {};
// Count enumerators
constexpr auto count = enum_count<Color>();
static_assert(count == 4);
static_assert(enum_count<Empty>() == 0);
// Can be used in template metaprogramming
struct EnumTraits {
static constexpr size_t size = N;
};
static_assert(EnumTraits<Color>::size == 4);

Definition at line 239 of file meta.hpp.

References gmp::enum_values().

◆ enum_entries()

template<typename E >
consteval auto gmp::enum_entries ( )

This function returns a compile-time array of (value, name) pairs for all reflected enumerators of E.

Template Parameters
EThe enumeration type to inspect.
Returns
A std::array<std::pair<E, std::string_view>, N> containing all reflected enumerators in declaration order.

Definition at line 355 of file meta.hpp.

References gmp::enum_values().

◆ enum_index()

template<typename E >
constexpr auto gmp::enum_index ( E  value) -> std::optional<std::size_t>
constexpr
Template Parameters
EThe enumeration type of the value being searched.
Parameters
valueThe enumerator value to locate.
Returns
std::optional<std::size_t> containing the index if found, otherwise std::nullopt.

Definition at line 380 of file meta.hpp.

References gmp::enum_values().

Referenced by gmp::enum_contains().

◆ enum_name()

template<auto E, fixed_string P = fixed_string("::")>
consteval auto gmp::enum_name ( )
Template Parameters
EThe enumerator value to get the name for.
PThe prefix string to remove from the full name (defaults to type name + "::").
Returns
A fixed_string containing the enumerator name, or "<unnamed>" if not found.
enum class Status { Ok = 200, NotFound = 404, Error = 500 };
enum { A, B, C }; // Unscoped enumeration
// Get individual enumerator names
constexpr auto ok_name = enum_name<Status::Ok>();
static_assert(ok_name == "Ok");
static_assert(not_found_name == "NotFound");
// Works with unscoped enums
constexpr auto a_name = enum_name<A>();
static_assert(a_name == "A");
// Compile-time string comparison
static_assert(enum_name<Status::Error>() == "Error");

Definition at line 273 of file meta.hpp.

References gmp::enum_values(), and gmp::name.

◆ enum_names()

template<typename E >
consteval auto gmp::enum_names ( )

This function returns an array containing the names of all enumerators in the enumeration type E.

Template Parameters
EThe enumeration type to get enumerator names for.
Returns
A std::array of std::string_view containing all enumerator names. Returns an empty array if the enumeration has no enumerators.
enum class Permission { Read, Write, Execute };
// Get all enumerator names
constexpr auto names = enum_names<Permission>();
static_assert(names.size() == 3);
static_assert(names[0] == "Read");
static_assert(names[1] == "Write");
static_assert(names[2] == "Execute");
// Iterate over enumerator names at compile-time
template<typename E>
constexpr bool has_enumerator(std::string_view name) {
constexpr auto names = enum_names<E>();
for (size_t i = 0; i < names.size(); ++i) {
if (names[i] == name) return true;
}
return false;
}
static_assert(has_enumerator<Permission>("Write"));
static_assert(!has_enumerator<Permission>("Delete"));
// Empty enum
enum class Empty {};
constexpr auto empty_names = enum_names<Empty>();
static_assert(empty_names.empty());

Definition at line 329 of file meta.hpp.

References gmp::enum_values().

◆ enum_underlying()

template<typename E >
requires std::is_enum_v<E>
constexpr auto gmp::enum_underlying ( E  value) -> std::underlying_type_t<E>
constexprnoexcept

Definition at line 414 of file meta.hpp.

Referenced by gmp::enum_contains().

◆ enum_values()

template<typename E , fixed_string P = type_name<E>() + fixed_string("::")>
consteval auto gmp::enum_values ( )

This function returns the full reflected enumerator set for E. If enum_traits<E>::values is provided, that explicit list is used. Otherwise, the function scans the integer range defined by enum_traits<E>::min and enum_traits<E>::max.

Template Parameters
EThe enumeration type to inspect.
PThe expected enumerator-name prefix used during range scanning.
Returns
A std::array containing all reflected enumerator values.
Note
This function is consteval and evaluated entirely at compile-time.
Examples
aggregate_reflection.cpp, reflection_enum.cpp, and type_name_and_size.cpp.

Definition at line 193 of file meta.hpp.

References gmp::enum_values().

Referenced by gmp::serialization_field< Member, Wire, Transient, Default, Aliases >::alias(), gmp::apply_members(), gmp::basic_serializer< Writer >::array(), gmp::basic_serializer< Writer >::begin_array(), gmp::basic_serializer< Writer >::begin_object(), gmp::object_factory< AbstractProduct, ConstructorArgs >::create(), gmp::object_factory< AbstractProduct, ConstructorArgs >::create_shared(), gmp::object_factory< AbstractProduct, ConstructorArgs >::create_unique(), gmp::basic_deserializer< Reader >::decode(), gmp::serialization_field< Member, Wire, Transient, Default, Aliases >::default_with(), gmp::serialization_field< Member, Wire, Transient, Default, Aliases >::defaulted(), gmp::define_schema(), gmp::serialization_error::describe(), gmp::basic_serializer< Writer >::array_archive::element(), gmp::value_reader::element(), gmp::enum_cast(), gmp::enum_contains(), gmp::enum_count(), gmp::enum_entries(), gmp::enum_index(), gmp::enum_name(), gmp::enum_names(), gmp::enum_values(), gmp::basic_serializer< Writer >::object_archive::field(), gmp::fixed_string< N >::find(), gmp::value_writer::finish(), gmp::fixed_string< N >::fixed_string(), gmp::fixed_string< N >::fixed_string(), gmp::has_member(), gmp::singleton< T, false >::instance(), gmp::singleton< T, true >::instance(), gmp::is_equal(), gmp::serialization_field< Member, Wire, Transient, Default, Aliases >::make_default(), gmp::make_named_operator(), gmp::serialization_field< Member, Wire, Transient, Default, Aliases >::matches(), gmp::value_reader::member(), gmp::member_count(), gmp::member_index(), gmp::member_name(), gmp::member_names(), gmp::member_ref(), gmp::serialization_field< Member, Wire, Transient, Default, Aliases >::name(), gmp::serialization_field< Member, Wire, Transient, Default, Aliases >::names_unique(), gmp::basic_serializer< Writer >::object(), gmp::pretty_type_name< T >::operator()(), gmp::pretty_type_name< std::vector< T > >::operator()(), gmp::pretty_type_name< std::array< T, N > >::operator()(), gmp::operator+(), gmp::fixed_string< N >::operator[](), gmp::serialization_field< Member, Wire, Transient, Default, Aliases >::overlaps(), gmp::prepend_serialization_path(), gmp::object_factory< AbstractProduct, ConstructorArgs >::register_type< T >::register_type(), gmp::object_factory< AbstractProduct, ConstructorArgs >::registered_keys(), gmp::remove_all(), gmp::serialization_value::source_offset(), gmp::fixed_string< N >::substr(), gmp::tie_members(), gmp::serialization_field< Member, Wire, Transient, Default, Aliases >::transient(), gmp::object_factory< AbstractProduct, ConstructorArgs >::try_create_shared(), gmp::object_factory< AbstractProduct, ConstructorArgs >::try_create_unique(), gmp::type_name(), gmp::visit_member(), gmp::basic_serializer< Writer >::write_bool(), gmp::value_writer::write_bool(), gmp::basic_serializer< Writer >::write_floating(), gmp::value_writer::write_floating(), gmp::basic_serializer< Writer >::write_key(), gmp::basic_serializer< Writer >::write_signed(), gmp::value_writer::write_signed(), gmp::basic_serializer< Writer >::write_string(), gmp::value_writer::write_string(), gmp::basic_serializer< Writer >::write_unsigned(), and gmp::value_writer::write_unsigned().

◆ for_each_member()

template<typename T , typename F >
requires reflectable<T>
constexpr void gmp::for_each_member ( T &&  value,
F &&  func 
)
constexprnoexcept

func is invoked once per member in declaration order. Each invocation receives the member name as std::string_view and the corresponding member reference.

Template Parameters
TThe aggregate object type.
FThe callable visitor type.
Parameters
valueThe aggregate object to inspect.
funcThe visitor invoked for each member.
Examples
aggregate_reflection.cpp.

Definition at line 842 of file meta.hpp.

Referenced by gmp::visit_member().

◆ has_member()

template<typename T >
requires reflectable<T>
constexpr bool gmp::has_member ( std::string_view  name)
constexpr

Definition at line 666 of file meta.hpp.

References gmp::enum_values(), and gmp::name.

◆ member_count()

template<typename T , typename... Args>
requires std::is_aggregate_v<std::remove_cvref_t<T>>
consteval int gmp::member_count ( )
Template Parameters
TThe aggregate type to count members for.
ArgsThe accumulated parameter types for construction testing.
Returns
The number of members in the aggregate type.
Note
This function is consteval and only works with aggregate types.
Requires std::is_aggregate_v<T> to be true.
struct Point { int x; int y; };
struct Empty {};
struct Mixed { int i; double d; char c; };
// Count members of aggregate types
static_assert(member_count<Point>() == 2);
static_assert(member_count<Empty>() == 0);
static_assert(member_count<Mixed>() == 3);
// Can be used in template constraints
template<typename T>
concept HasTwoMembers = std::is_aggregate_v<T> && member_count<T>() == 2;
static_assert(HasTwoMembers<Point>);
static_assert(!HasTwoMembers<Mixed>);

Definition at line 473 of file meta.hpp.

References gmp::enum_values(), and gmp::member_count().

Referenced by gmp::member_count().

◆ member_index()

template<typename T >
requires reflectable<T>
constexpr auto gmp::member_index ( std::string_view  name) -> std::optional<std::size_t>
constexpr

Definition at line 651 of file meta.hpp.

References gmp::enum_values(), and gmp::name.

◆ member_name()

template<std::size_t I, typename T >
requires std::is_aggregate_v<T> && (I < member_count<T>()) && (member_count<T>() <= GMP_MAX_SUPPORTED_FIELDS)
consteval auto gmp::member_name ( )
noexcept
Template Parameters
IThe zero-based index of the member to get the name for.
TThe aggregate type containing the member.
Returns
A fixed_string containing the member name.
Note
This function is consteval and requires:
Exceptions
Compile-timeerror if any of the above requirements are not met.
struct Person {
std::string name;
int age;
double height;
};
struct Empty {};
// Get individual member names
static_assert(first_member == "name");
static_assert(second_member == "age");
static_assert(third_member == "height");
// Use in static assertions
static_assert(member_name<0, Person>().size() == 4);
// Template metaprogramming
template<typename T, size_t I>
struct MemberTraits {
static constexpr auto name = member_name<I, T>();
static constexpr size_t index = I;
};
static_assert(MemberTraits<Person, 1>::name == "age");
// These would cause compile-time errors:
// member_name<0, Empty>(); // Error: I < member_count<T>() fails
// member_name<3, Person>(); // Error: Index out of bounds
// member_name<0, int>(); // Error: Not an aggregate

Definition at line 558 of file meta.hpp.

References gmp::constant_arg, gmp::enum_values(), and gmp::name.

◆ member_names()

template<typename T >
consteval auto gmp::member_names ( )

This function returns an array containing the names of all members of the aggregate type T.

Template Parameters
TThe aggregate type to get member names for.
Returns
A std::array of std::string_view containing all member names. Returns an empty array if the aggregate has no members.
struct Vector3 { float x; float y; float z; };
struct Empty {};
struct Config { int timeout; bool enabled; std::string host; };
// Get all member names
static_assert(vec_members.size() == 3);
static_assert(vec_members[0] == "x");
static_assert(vec_members[1] == "y");
static_assert(vec_members[2] == "z");
// Empty aggregate
static_assert(empty_members.empty());
// Compile-time iteration
template<typename T>
constexpr bool has_member(std::string_view name) {
constexpr auto names = member_names<T>();
for (size_t i = 0; i < names.size(); ++i) {
if (names[i] == name) return true;
}
return false;
}
static_assert(has_member<Config>("timeout"));
static_assert(has_member<Config>("host"));
static_assert(!has_member<Config>("port"));
// Generate compile-time member name list
template<typename T>
struct MemberList {
static constexpr auto names = member_names<T>();
static constexpr size_t size = names.size();
template<size_t I>
static constexpr auto get() { return names[I]; }
};
static_assert(Vector3Members::size == 3);
static_assert(Vector3Members::get<1>() == "y");
constexpr bool has_member(std::string_view name)
Test whether an aggregate has a reflected member with the given name.
Definition meta.hpp:666

Definition at line 632 of file meta.hpp.

References gmp::enum_values().

◆ member_ref()

template<std::size_t I, typename T , typename UnqualifiedT = std::remove_cvref_t<T>>
requires std::is_aggregate_v<UnqualifiedT> && (I < member_count<UnqualifiedT>()) && (member_count<UnqualifiedT>() <= GMP_MAX_SUPPORTED_FIELDS)
decltype(auto) gmp::member_ref ( T &&  value)
noexcept

This function returns the selected member while preserving the value category of the aggregate object passed in.

Template Parameters
IThe zero-based member index.
TThe aggregate object type.
UnqualifiedTThe cvref-stripped aggregate type.
Parameters
valueThe aggregate object whose member is requested.
Returns
A reference to the I-th member.

Definition at line 763 of file meta.hpp.

References gmp::constant_arg, and gmp::enum_values().

◆ member_type_names()

template<typename T >
constexpr auto gmp::member_type_names ( )
constexpr
Template Parameters
T- The aggregate type to introspect (struct/class with public members)
Returns
std::array<std::string_view, N> where N is the member count of T, containing the demangled/pretty type names of each member in declaration order
Note
The type names are generated at compile time and stored as static data
The returned string_views remain valid for the entire program lifetime
Requires T to be an aggregate type with known member count at compile time
struct Person {
int age;
std::string name;
double height;
};
// names[0] == "int"
// names[1] == "std::string" (or "std::basic_string<char>")
// names[2] == "double"
See also
member_type_t, member_count

Definition at line 743 of file meta.hpp.

◆ tie_members()

template<typename T >
requires reflectable<T>
constexpr auto gmp::tie_members ( T &  value)
constexprnoexcept

Definition at line 784 of file meta.hpp.

References gmp::enum_values().

Referenced by gmp::apply_members().

◆ type_name()

template<typename T >
consteval auto gmp::type_name ( )

This function returns a compile-time string representing the name of the given type T. The implementation is compiler-specific and extracts the type name from compiler-generated function signatures.

Template Parameters
TThe type whose name is to be retrieved.
Returns
A fixed_string containing the type name. If the compiler is not supported (currently GCC, Clang, and MSVC are supported), returns "Unknown type name".
Note
This function is marked as consteval, ensuring it's evaluated entirely at compile-time. The returned string is suitable for compile-time string manipulation and comparison.
auto int_name = type_name<int>(); // "int" on all compilers
auto vec_name = type_name<std::vector<int>>(); // Compiler-specific representation
// Can be used in static assertions
static_assert(type_name<int>().size() == 3);

Definition at line 53 of file type_name.hpp.

References gmp::enum_values(), gmp::name, gmp::remove_all(), and gmp::fixed_string< N >::size().

◆ type_size()

template<typename T >
consteval std::size_t gmp::type_size ( )

For aggregate types, this function sums the sizes of members in declaration order and does not count padding bytes inserted between members or after the final member. Nested aggregate members and bounded array types are calculated recursively. Non-aggregate leaf types use sizeof(T).

Template Parameters
TThe type to calculate.
Returns
The payload size of T, excluding aggregate padding.
struct Packet {
char tag;
int value;
};
static_assert(gmp::type_size<Packet>() == sizeof(char) + sizeof(int));
static_assert(gmp::type_size<Packet>() <= sizeof(Packet));

Definition at line 82 of file type_size.hpp.

◆ visit_member()

template<typename T , typename F >
requires reflectable<T>
constexpr bool gmp::visit_member ( T &&  value,
std::string_view  name,
F &&  func 
)
constexpr

The callable must accept every possible member type of T. It is invoked once when name matches a reflected member.

Definition at line 878 of file meta.hpp.

References gmp::enum_values(), gmp::for_each_member(), and gmp::name.

Variable Documentation

◆ enum_max_v

template<typename E >
constexpr int gmp::enum_max_v
inlineconstexpr
Template Parameters
EThe enumeration type.

Definition at line 101 of file meta.hpp.

◆ enum_min_v

template<typename E >
constexpr int gmp::enum_min_v
inlineconstexpr
Template Parameters
EThe enumeration type.

Definition at line 93 of file meta.hpp.

◆ member_count_v

template<typename T >
constexpr auto gmp::member_count_v
inlineconstexpr

Definition at line 486 of file meta.hpp.