|
GREM 3.12.0
Game/Rendering Engine Modules for C++
|
Classes | |
| struct | Constant |
| Wrapper type for a compile-time constant value. More... | |
| struct | Type |
| Type identity wrapper. More... | |
| struct | TypeList |
| Compile-time list of types. More... | |
Concepts | |
| concept | type_list |
| Concept that checks if a given type is a specialization of meta::TypeList. | |
Typedefs | |
| template<typename List, std::size_t Index> | |
| using | type_list_type_t = typename type_list_type<List, Index>::type |
| Type at a specific index of a specialization of meta::TypeList. | |
| template<typename... Lists> | |
| using | type_list_concat_t = typename type_list_concat<Lists...>::type |
| Concatenation of a sequence of specializations of meta::TypeList into a single meta::TypeList. | |
| template<typename Aggregate> | |
| using | aggregate_field_types_t = typename aggregate_field_types<Aggregate>::type |
| Type list containing the types of the fields of a given aggregate type. | |
| template<std::size_t Index, typename Aggregate> | |
| using | aggregate_field_type_t = typename aggregate_field_type<Index, Aggregate>::type |
| Type of a given field of an aggregate type. | |
| template<auto Member> | |
| using | member_pointer_target_type_t = typename member_pointer_target_type<Member>::type |
| Target member type of a given pointer-to-member. | |
| template<auto Member> | |
| using | member_pointer_object_type_t = typename member_pointer_object_type<Member>::type |
| Object type of a given pointer-to-member. | |
| template<typename Function> | |
| using | function_parameter_types_t = typename function_parameter_types<Function>::type |
| List of parameter types of a given function. | |
| template<typename Function> | |
| using | function_return_type_t = typename function_return_type<Function>::type |
| Return type of a given function. | |
| template<typename V> | |
| using | variant_alternative_types_t = typename variant_alternative_types<V>::type |
| List of all alternative types of a given variant. | |
| template<typename T> | |
| using | tuple_element_types_t = typename tuple_element_types<T>::type |
| List of all element types of a given tuple. | |
| template<typename V> | |
| using | tuple_of_variant_alternatives_t = typename tuple_of_variant_alternatives<V>::type |
| Tuple of all alternative types of a given variant. | |
Functions | |
| template<size_t N, typename T, typename... Args> | |
| constexpr auto | createN (Args &&... args) |
| Construct a fixed-size array of N elements of type T, where each element is constructed from the same arguments. | |
| template<typename T, size_t N> | |
| constexpr auto | transform (Array< T, N > &array, auto fn) |
| Execute a function for each element in a given array and return an array containing the results. | |
| template<typename T, size_t N> | |
| constexpr auto | transform (const Array< T, N > &array, auto fn) |
| Execute a function for each element in a given array and return an array containing the results. | |
| template<typename T, size_t N> | |
| constexpr auto | transform (Array< T, N > &&array, auto fn) |
| Execute a function for each element in a given array and return an array containing the results. | |
| template<typename T, size_t N> | |
| constexpr auto | transform (const Array< T, N > &&array, auto fn) |
| Execute a function for each element in a given array and return an array containing the results. | |
| constexpr auto | transform (auto &&tuple, auto fn) |
| Execute a function for each element in a given tuple and return a tuple containing the results. | |
| constexpr void | forEach (auto &&tuple, auto fn) |
| Execute a function for each element in a given tuple, sequentially. | |
| template<std::size_t N> | |
| constexpr void | forEachIndex (auto fn) |
| Execute a function for each index in the sequence from 0 up to, but not including, a given count N. | |
| template<size_t N, typename T> | |
| constexpr auto | generateN (auto fn) |
| Construct a fixed-size array, using a function to create each of its elements, optionally based on the element index. | |
| template<std::size_t N> | |
| constexpr decltype(auto) | visitIndex (std::size_t index, auto fn) |
| Execute a function associated with one specific index in the sequence from 0 up to, but not including, a given count N. | |
| template<typename List> | |
| constexpr void | forEachType (auto fn) |
| Execute a function for each type in a type list. | |
| template<typename Aggregate> | |
| constexpr void | forEachFieldIndex (auto fn) |
| Execute a function for each field index of an aggregate. | |
| template<typename Aggregate> | |
| constexpr void | forEachFieldType (auto fn) |
| Execute a function for each field type of an aggregate. | |
| template<typename Aggregate> | |
| constexpr void | forEachIndexedFieldType (auto fn) |
| Execute a function for each field type of an aggregate, also including the field index. | |
| constexpr auto | getFields (auto &&value) noexcept |
| Get a tuple of references to each of the fields of an aggregate. | |
| template<typename Aggregate> | |
| constexpr void | forEachField (Aggregate &&value, auto fn) |
| Execute a function for each field of an aggregate. | |
| template<typename Aggregate> | |
| constexpr void | forEachIndexedField (Aggregate &&value, auto fn) |
| Execute a function for each field of an aggregate, also including the field index. | |
| template<typename Aggregate> | |
| constexpr void | forEachNamedFieldIndex (auto fn) |
| Execute a function for each field index of an aggregate, also including the field name. | |
| template<typename Aggregate> | |
| constexpr void | forEachNamedFieldType (auto fn) |
| Execute a function for each field type of an aggregate, also including the field name. | |
| template<typename Aggregate> | |
| constexpr void | forEachIndexedNamedFieldType (auto fn) |
| Execute a function for each field type of an aggregate, also including the field name and index. | |
| template<typename Aggregate> | |
| constexpr void | forEachNamedField (Aggregate &&value, auto fn) |
| Execute a function for each field of an aggregate, also including the field name. | |
| template<typename Aggregate> | |
| constexpr void | forEachIndexedNamedField (Aggregate &&value, auto fn) |
| Execute a function for each field of an aggregate, also including the field index and name. | |
| template<enumeration Enum> | |
| constexpr decltype(auto) | visitEnumerand (Enum value, auto fn) |
| Execute a function associated with one specific enumerand in the sequence of valid enumerands starting at value 0 in a given enum type. | |
| template<enumeration Enum> | |
| constexpr void | forEachEnumerand (auto fn) |
| Execute a function for each consecutive valid enumerand starting at value 0 in a given enum type. | |
| template<enumeration Enum> | |
| constexpr void | forEachIndexedEnumerand (auto fn) |
| Execute a function for each consecutive valid enumerand starting at value 0 in a given enum type, also including the enumerand index. | |
| template<enumeration Enum> | |
| constexpr void | forEachNamedEnumerand (auto fn) |
| Execute a function for each consecutive valid enumerand starting at value 0 in a given enum type, also including the enumerand name. | |
| template<enumeration Enum> | |
| constexpr void | forEachIndexedNamedEnumerand (auto fn) |
| Execute a function for each consecutive valid enumerand starting at value 0 in a given enum type, also including the enumerand index and name. | |
| template<enumeration Enum> | |
| constexpr CStringView | getEnumerandName (Enum value) |
| Get the name of a specific enumerand in a given enum type. | |
Variables | |
| template<typename... Ts> | |
| constexpr bool | always_false_v = false |
| Type-dependent boolean that always evaluates to false. | |
| template<auto X> | |
| constexpr Constant< X > | CONSTANT {} |
| Wrapper value for a compile-time constant value. | |
| template<typename T> | |
| constexpr Type< T > | TYPE {} |
| Wrapper value for a type identity wrapper. | |
| template<typename... Ts> | |
| constexpr TypeList< Ts... > | TYPE_LIST {} |
| Wrapper value for a compile-time list of types. | |
| template<typename T> | |
| constexpr bool | is_type_list_v = is_type_list<T>::value |
| Boolean that evaluates to true if the given type is a specialization of meta::TypeList. | |
| template<typename List> | |
| constexpr std::size_t | type_list_size_v = type_list_size<List>::value |
| Number of types in a specialization of meta::TypeList. | |
| template<typename List> | |
| constexpr bool | type_list_empty_v = type_list_empty<List>::value |
| Whether a specialization of meta::TypeList is empty or not. | |
| template<typename List, typename T> | |
| constexpr bool | type_list_contains_v = type_list_contains<List, T>::value |
| Whether a specialization of meta::TypeList contains a specific type. | |
| template<typename List, typename T> | |
| constexpr std::size_t | type_list_index_v = type_list_index<List, T>::value |
| Index of the first occurence of a specific type in a specialization of meta::TypeList. | |
| template<typename List, typename T> | |
| constexpr std::size_t | type_list_rindex_v = type_list_rindex<List, T>::value |
| Index of the last occurence of a specific type in a specialization of meta::TypeList. | |
| template<typename List, typename T> | |
| constexpr std::size_t | type_list_count_v = type_list_count<List, T>::value |
| Number of occurences of a sepcific type in a specialization of meta::TypeList. | |
| template<typename List, typename PrefixList> | |
| constexpr bool | type_list_starts_with_v = type_list_starts_with<List, PrefixList>::value |
| Whether a specialization of meta::TypeList starts with the types in another type list. | |
| template<typename List, typename T> | |
| constexpr bool | type_list_starts_with_type_v = type_list_starts_with_type<List, T>::value |
| Whether a specialization of meta::TypeList starts with a specific type. | |
| template<typename Aggregate> | |
| constexpr std::size_t | aggregate_size_v = aggregate_size<Aggregate>::value |
| The number of fields in a given aggregate type. | |
| template<typename T> | |
| constexpr auto | unqualified_type_name_v = ConstantString<char, unqualified_type_name<T>::value.size()>{unqualified_type_name<T>::value} |
| Unqualified name of a type. | |
| template<std::size_t Index, typename Aggregate> | |
| constexpr auto | aggregate_field_name_v = ConstantString<char, aggregate_field_name<Index, Aggregate>::value.size()>{aggregate_field_name<Index, Aggregate>::value} |
| Name of the field at a given index of an aggregate type. | |
| template<std::size_t Index, typename Enum> | |
| constexpr auto | enumerand_name_at_v = ConstantString<char, enumerand_name_at<Index, Enum>::value.size()>{enumerand_name_at<Index, Enum>::value} |
| Name of the enumerand at a given index of an enum type. | |
| template<auto Enumerand> | |
| constexpr auto | enumerand_name_v = ConstantString<char, enumerand_name<Enumerand>::value.size()>{enumerand_name<Enumerand>::value} |
| Name of a given enumerand of an enum type. | |
| template<typename Enum> | |
| constexpr std::size_t | enum_size_v = enum_size<Enum>::value |
| The number of consecutive valid enumerands starting at value 0 in a given enum type. | |
| template<auto Member> | |
| constexpr size_t | member_pointer_index_v = member_pointer_index<Member>::value |
| Index of the field referenced by a given pointer-to-member in its outer struct. | |
| using grem::meta::type_list_type_t = typename type_list_type<List, Index>::type |
Type at a specific index of a specialization of meta::TypeList.
| List | type list to get the type from. Must be a specialization of meta::TypeList. |
| Index | index of the type to get. Must be less than the type list size. |
| using grem::meta::type_list_concat_t = typename type_list_concat<Lists...>::type |
Concatenation of a sequence of specializations of meta::TypeList into a single meta::TypeList.
| Lists | type lists to concatenate. Must all be specializations of meta::TypeList. |
| using grem::meta::aggregate_field_types_t = typename aggregate_field_types<Aggregate>::type |
Type list containing the types of the fields of a given aggregate type.
| Aggregate | aggregate type to get the field types of. |
| using grem::meta::aggregate_field_type_t = typename aggregate_field_type<Index, Aggregate>::type |
Type of a given field of an aggregate type.
| Index | index of the field to get the type of. |
| Aggregate | aggregate type to get the field type of. |
| using grem::meta::member_pointer_target_type_t = typename member_pointer_target_type<Member>::type |
Target member type of a given pointer-to-member.
| Pointer | to member to get the target type of. |
| using grem::meta::member_pointer_object_type_t = typename member_pointer_object_type<Member>::type |
Object type of a given pointer-to-member.
| Pointer | to member to get the object type of. |
| using grem::meta::function_parameter_types_t = typename function_parameter_types<Function>::type |
List of parameter types of a given function.
| Function | function type to get the parameter types of. |
| using grem::meta::function_return_type_t = typename function_return_type<Function>::type |
Return type of a given function.
| Function | function type to get the return type of. |
| using grem::meta::variant_alternative_types_t = typename variant_alternative_types<V>::type |
List of all alternative types of a given variant.
| V | variant type to get the alternative types of. |
| using grem::meta::tuple_element_types_t = typename tuple_element_types<T>::type |
List of all element types of a given tuple.
| T | tuple type to get the element types of. |
| using grem::meta::tuple_of_variant_alternatives_t = typename tuple_of_variant_alternatives<V>::type |
Tuple of all alternative types of a given variant.
| V | variant type to get the alternative types tuple of. |
|
nodiscardconstexpr |
Construct a fixed-size array of N elements of type T, where each element is constructed from the same arguments.
| N | size of the array to construct. |
| T | element type of the array to construct. |
| args | arguments to pass to each element's constructor. |
| any | exception thrown by the element constructors or by making an array from the results. |
|
nodiscardconstexpr |
Execute a function for each element in a given array and return an array containing the results.
| array | array to transform. |
| fn | function to execute. Must accept a reference to the array's element type as a parameter and return a non-void value. |
| any | exception thrown by fn or by making an array from the results. |
|
nodiscardconstexpr |
Execute a function for each element in a given array and return an array containing the results.
| array | array to transform. |
| fn | function to execute. Must accept a reference to the array's element type as a parameter and return a non-void value. |
| any | exception thrown by fn or by making an array from the results. |
|
nodiscardconstexpr |
Execute a function for each element in a given array and return an array containing the results.
| array | array to transform. |
| fn | function to execute. Must accept a reference to the array's element type as a parameter and return a non-void value. |
| any | exception thrown by fn or by making an array from the results. |
|
nodiscardconstexpr |
Execute a function for each element in a given array and return an array containing the results.
| array | array to transform. |
| fn | function to execute. Must accept a reference to the array's element type as a parameter and return a non-void value. |
| any | exception thrown by fn or by making an array from the results. |
|
nodiscardconstexpr |
Execute a function for each element in a given tuple and return a tuple containing the results.
| tuple | tuple to transform. |
| fn | function to execute. Must accept a reference to each of the types in the tuple as a parameter and return a non-void value. |
| any | exception thrown by fn or by making a tuple from the results. |
|
constexpr |
Execute a function for each element in a given tuple, sequentially.
| tuple | tuple to iterate. |
| fn | function to execute. Must accept a reference to each of the types in the tuple as a parameter. |
| any | exception thrown by fn. |
|
constexpr |
Execute a function for each index in the sequence from 0 up to, but not including, a given count N.
| N | the number of indices in the sequence. |
| fn | function to execute. Must accept an object of type meta::Constant<I> as a parameter, where I is any integer from 0 up to, but not including, N. |
| any | exception thrown by fn. |
|
nodiscardconstexpr |
Construct a fixed-size array, using a function to create each of its elements, optionally based on the element index.
| N | size of the array to generate. |
| T | element type of the array to generate. |
| fn | function that generates each element. May optionally accept the index of the array as either a size_t parameter or meta::Constant parameter with a non-type template parameter of type size_t as its template argument. |
| any | exception thrown by fn or by making an array from the results. |
|
constexpr |
Execute a function associated with one specific index in the sequence from 0 up to, but not including, a given count N.
| N | the number of indices in the sequence. |
| index | the index to execute the corresponding function overload of. |
| fn | function to execute. Must accept an object of type meta::Constant<I> as a parameter, where I is any integer from 0 up to, but not including, N. |
| std::out_of_range | if index >= N. |
| any | exception thrown by fn. |
|
constexpr |
Execute a function for each type in a type list.
| List | TypeList type. |
| fn | function to execute. Must accept an object of type meta::Type<T> as a parameter, where T is any type in the given type list. |
| any | exception thrown by fn. |
|
constexpr |
Execute a function for each field index of an aggregate.
| Aggregate | type to iterate the field indices of. |
| fn | function to execute. Must accept an object of type meta::Constant<I> as a parameter, where I is any integer from 0 up to, but not including, the number of fields in the aggregate. |
| any | exception thrown by fn. |
|
constexpr |
Execute a function for each field type of an aggregate.
| Aggregate | type to iterate the field types of. |
| fn | function to execute. Must accept an object of type meta::Type<T> as a parameter, where T is any field type of the aggregate. |
| any | exception thrown by fn. |
|
constexpr |
Execute a function for each field type of an aggregate, also including the field index.
| Aggregate | type to iterate the indexed field types of. |
| fn | function to execute. Must accept the two following parameters:
|
| any | exception thrown by fn. |
|
nodiscardconstexprnoexcept |
Get a tuple of references to each of the fields of an aggregate.
| value | forwarding reference to an object of an aggregate type. |
|
constexpr |
Execute a function for each field of an aggregate.
| value | forwarding reference to an object of an aggregate type. |
| fn | function to execute. Must accept a reference to each field type of the aggregate. |
| any | exception thrown by fn. |
|
constexpr |
Execute a function for each field of an aggregate, also including the field index.
| value | forwarding reference to an object of an aggregate type. |
| fn | function to execute. Must accept the two following parameters:
|
| any | exception thrown by fn. |
|
constexpr |
Execute a function for each field index of an aggregate, also including the field name.
| Aggregate | type to iterate the named field indices of. |
| fn | function to execute. Must accept the two following parameters:
|
| any | exception thrown by fn. |
|
constexpr |
Execute a function for each field type of an aggregate, also including the field name.
| Aggregate | type to iterate the named field types of. |
| fn | function to execute. Must accept the two following parameters:
|
| any | exception thrown by fn. |
|
constexpr |
Execute a function for each field type of an aggregate, also including the field name and index.
| Aggregate | type to iterate the indexed named field types of. |
| fn | function to execute. Must accept the two following parameters:
|
| any | exception thrown by fn. |
|
constexpr |
Execute a function for each field of an aggregate, also including the field name.
| value | forwarding reference to an object of an aggregate type. |
| fn | function to execute. Must accept the two following parameters:
|
| any | exception thrown by fn. |
|
constexpr |
Execute a function for each field of an aggregate, also including the field index and name.
| value | forwarding reference to an object of an aggregate type. |
| fn | function to execute. Must accept the three following parameters:
|
| any | exception thrown by fn. |
|
constexpr |
Execute a function associated with one specific enumerand in the sequence of valid enumerands starting at value 0 in a given enum type.
| Enum | enum type. Must have a fixed underlying type. |
| value | the enumerand to execute the corresponding function overload of. |
| fn | function to execute. Must accept an object of type meta::Constant<Enumerand> as a parameter, where Enumerand is any enumeration value from 0 up to, but not including, meta::enum_size_v<Enum>. |
| std::out_of_range | if static_cast<std::size_t>(value) >= meta::enum_size_v<Enum>. |
| any | exception thrown by fn. |
|
constexpr |
Execute a function for each consecutive valid enumerand starting at value 0 in a given enum type.
| Enum | enum type. Must have a fixed underlying type. |
| fn | function to execute. Must accept an object of type meta::Constant<Enumerand> as a parameter, where Enumerand is any enumeration value from 0 up to, but not including, meta::enum_size_v<Enum>. |
| any | exception thrown by fn. |
|
constexpr |
Execute a function for each consecutive valid enumerand starting at value 0 in a given enum type, also including the enumerand index.
| Enum | enum type. Must have a fixed underlying type. |
| fn | function to execute. Must accept the two following parameters:
|
| any | exception thrown by fn. |
|
constexpr |
Execute a function for each consecutive valid enumerand starting at value 0 in a given enum type, also including the enumerand name.
| Enum | enum type. Must have a fixed underlying type. |
| fn | function to execute. Must accept the two following parameters:
|
| any | exception thrown by fn. |
|
constexpr |
Execute a function for each consecutive valid enumerand starting at value 0 in a given enum type, also including the enumerand index and name.
| Enum | enum type. Must have a fixed underlying type. |
| fn | function to execute. Must accept the three following parameters:
|
| any | exception thrown by fn. |
|
nodiscardconstexpr |
Get the name of a specific enumerand in a given enum type.
| Enum | enum type. Must have a fixed underlying type. |
| value | the enumerand to get the name of. |
| std::out_of_range | if static_cast<std::size_t>(value) >= meta::enum_size_v<Enum>. |
|
inlineconstexpr |
Type-dependent boolean that always evaluates to false.
| Ts | type(s) that the value conceptually "depends" on. |
|
constexpr |
Wrapper value for a compile-time constant value.
| X | constant value to wrap. |
|
constexpr |
Wrapper value for a type identity wrapper.
| T | type to wrap. |
|
constexpr |
Wrapper value for a compile-time list of types.
| Ts | pack of types to wrap. |
|
inlineconstexpr |
Boolean that evaluates to true if the given type is a specialization of meta::TypeList.
| T | type to check. |
|
inlineconstexpr |
Number of types in a specialization of meta::TypeList.
| List | type list to get the size of. Must be a specialization of meta::TypeList. |
|
inlineconstexpr |
Whether a specialization of meta::TypeList is empty or not.
| List | type list to check. |
|
inlineconstexpr |
Whether a specialization of meta::TypeList contains a specific type.
| List | type list to check. Must be a specialization of meta::TypeList. |
| T | type to check for. |
|
inlineconstexpr |
Index of the first occurence of a specific type in a specialization of meta::TypeList.
| List | type list to get the index from. Must be a specialization of meta::TypeList. |
| T | type to get the index of. Must be a type that the type list contains. |
|
inlineconstexpr |
Index of the last occurence of a specific type in a specialization of meta::TypeList.
| List | type list to get the index from. Must be a specialization of meta::TypeList. |
| T | type to get the index of. Must be a type that the type list contains. |
|
inlineconstexpr |
Number of occurences of a sepcific type in a specialization of meta::TypeList.
| List | type list. Must be a specialization of meta::TypeList. |
| T | type to count the number of occurences of. |
|
inlineconstexpr |
Whether a specialization of meta::TypeList starts with the types in another type list.
| List | type list to check. Must be a specialization of meta::TypeList. |
| PrefixList | list of prefix types to check for. Must be a specialization of meta::TypeList. |
|
inlineconstexpr |
Whether a specialization of meta::TypeList starts with a specific type.
| List | type list to check. Must be a specialization of meta::TypeList. |
| T | first type to check for. |
|
inlineconstexpr |
The number of fields in a given aggregate type.
| T | aggregate type to get the number of fields in. |
|
inlineconstexpr |
Unqualified name of a type.
| T | type to get the name of. |
|
inlineconstexpr |
Name of the field at a given index of an aggregate type.
| Index | index of the field to get the name of. |
| Aggregate | default-constructible aggregate type containing the field to get the name of. |
|
inlineconstexpr |
Name of the enumerand at a given index of an enum type.
| Index | index of the enumerand to get the name of. Must be a valid index for the given enum type. |
| Enum | enum type containing the enumerand to get the name of. Must have a fixed underlying type. |
|
inlineconstexpr |
Name of a given enumerand of an enum type.
| Enumerand | value of the enumerand to get the name of. |
|
inlineconstexpr |
The number of consecutive valid enumerands starting at value 0 in a given enum type.
| T | enum type to get the number of enumerands in. |
|
inlineconstexpr |
Index of the field referenced by a given pointer-to-member in its outer struct.
| Pointer | to member to get the index of. Its object type must be an aggregate type. |