![]() |
MCRO
C++23 utilities for Unreal Engine.
|
This namespace provides templating utilities and introspection into template instantiations. More...
Namespaces | |
| namespace | Detail |
Data Structures | |
| struct | TIsTypeList_Struct |
| struct | TIsTypeList_Struct< TTypes< T... > > |
| struct | TTemplate_Match |
| Base struct for matching templates disregarding their arguments. More... | |
| struct | TTemplate_Struct |
| struct | TTemplate_Struct< Template< Params... > > |
| Base struct containing traits of specified template instance (which only accepts type parameters) More... | |
| struct | TTemplateMap_Struct |
| struct | TTemplateMap_Struct< TemplateOut, TemplateIn< Params... > > |
| struct | TTupleSafeElement_Struct |
| struct | TTupleSafeElement_Struct< I, TTuple< T... > > |
| struct | TTypeAtPack_Struct |
| struct | TTypeAtPack_Struct< I > |
| struct | TTypes |
| This template is used to store pack of types in other templates, or to allow parameter pack inference for functions. This template may be referred to as 'type-list' in other parts of the documentation. More... | |
| struct | TTypesSkip_Struct |
| struct | TTypesTake_Struct |
| struct | TTypesTrimEnd_Struct |
Concepts | |
| concept | CTypeList |
Concept constraining a given type to TTypes | |
| concept | CTypesConvertibleTo |
| Is given type-list contains all types convertible to the types of another type-list. The number and order of types are significant. | |
| concept | CTypesConvertibleToDecayed |
| Is given type-list contains all types convertible to the types of another type-list. The number and order of types are significant. Qualifiers are not taken into account. | |
| concept | CTypeOnlyTemplate |
| Checks if input is a template which only has type parameters. | |
| concept | CMatchTemplate |
| Check if given type is an instantiation of a given template (which only accepts type parameters) | |
Typedefs | |
| template<size_t I, typename... Rest> | |
| using | TTypeAtPack = typename TTypeAtPack_Struct<I, Rest...>::Type |
| Get a specific item from a parameter pack at given index. It is an unspecified compile error to index an empty parameter pack. | |
| template<size_t I, typename... Rest> | |
| using | TLastTypeAtPack = typename TTypeAtPack_Struct<sizeof...(Rest) - I - 1, Rest...>::Type |
| Get a specific item from the end of a parameter pack at given index (0 == last). It is an unspecified compile error to index an empty parameter pack. | |
| template<size_t I, typename... Rest> | |
| using | TTypeAtPackDecay = std::decay_t<typename TTypeAtPack_Struct<I, Rest...>::Type> |
| Get a specific item from a parameter pack at given index disregarding CV-ref qualifiers. It is an unspecified compile error to index an empty parameter pack. | |
| template<size_t I, typename... Rest> | |
| using | TLastTypeAtPackDecay = std::decay_t<typename TTypeAtPack_Struct<sizeof...(Rest) - I - 1, Rest...>::Type> |
| Get a specific item from the end of a parameter pack at given index (0 == last) disregarding CV-ref qualifiers. It is an unspecified compile error to index an empty parameter pack. | |
| template<CTypeList T, size_t I> | |
| using | TTypes_Get = T::template Get<I> |
| template<CTypeList T, size_t I> | |
| using | TTypes_GetDecay = T::template GetDecay<I> |
| template<CTypeList T, size_t... Indices> | |
| using | TComposeTypeListFrom = TTypes<TTypes_Get<T, Indices>...> |
| template<size_t Count, CTypeList T> | |
| using | TTypesSkip = typename TTypesSkip_Struct<Count, T>::Type |
| template<size_t Count, typename T > | |
| using | TTypesTrimEnd = typename TTypesTrimEnd_Struct<Count, T>::Type |
| template<size_t Count, typename T > | |
| using | TTypesTake = typename TTypesTake_Struct<Count, T>::Type |
| template<CTypeOnlyTemplate Instance> | |
| using | TTemplate_Params = typename TTemplate_Struct<Instance>::Parameters |
| Get template type parameters as a tuple. | |
| template<CTypeOnlyTemplate Instance> | |
| using | TTemplate_ParamsDecay = typename TTemplate_Struct<Instance>::ParametersDecay |
| Get decayed template type parameters as a tuple. | |
| template<CTypeOnlyTemplate Instance, int I> | |
| using | TTemplate_Param = typename TTemplate_Struct<Instance>::template Param<I> |
| Get a type parameter at a specified position of a templated instance. | |
| template<CTypeOnlyTemplate Instance, int I> | |
| using | TTemplate_ParamDecay = typename TTemplate_Struct<Instance>::template ParamDecay<I> |
| Get a decayed type parameter at a specified position of a templated instance. | |
| template<template< typename... > typename TemplateOut, CTypeOnlyTemplate FromInstance> | |
| using | TTemplateMap = typename TTemplateMap_Struct<TemplateOut, FromInstance>::Type |
Transfer parameters from one template to another. Or in other words replace the template part of the input template instance with TemplateOut. | |
Functions | |
| template<CConstType T> | |
| constexpr auto && | AsConst (T &&input) |
Tired of typing const_cast<FMyLongUnwieldyTypeName>(...)? use this instead. | |
| template<CMutableType T> | |
| constexpr auto && | AsMutable (T &&input) |
Tired of typing const_cast<FMyLongUnwieldyTypeName>(...)? use this instead. | |
| template<typename T > | |
| constexpr auto | AsConstPtr (const T *input) |
Tired of typing const_cast<FMyLongUnwieldyTypeName*>(...)? use this instead. | |
| template<typename T > | |
| constexpr auto | AsConstPtr (T *input) |
Tired of typing const_cast<FMyLongUnwieldyTypeName*>(...)? use this instead. | |
| template<typename T > | |
| constexpr auto | AsMutablePtr (T *input) |
Tired of typing const_cast<FMyLongUnwieldyTypeName*>(...)? use this instead. | |
| template<typename T > | |
| constexpr auto | AsMutablePtr (const T *input) |
Tired of typing const_cast<FMyLongUnwieldyTypeName*>(...)? use this instead. | |
Variables | |
| template<CTypeOnlyTemplate Instance> | |
| constexpr size_t | TTemplate_ParamCount = TTemplate_Struct<Instance>::ParameterCount |
| Get the number of template type parameters from a specified templated instance (which only has type parameters) | |
This namespace provides templating utilities and introspection into template instantiations.
| using Mcro::Templates::TComposeTypeListFrom = TTypes<TTypes_Get<T, Indices>...> |
Compose a type-list out of the elements of the input type-list based on the input index parameter pack
Definition at line 137 of file Templates.h.
| using Mcro::Templates::TLastTypeAtPack = typename TTypeAtPack_Struct<sizeof...(Rest) - I - 1, Rest...>::Type |
Get a specific item from the end of a parameter pack at given index (0 == last). It is an unspecified compile error to index an empty parameter pack.
Definition at line 67 of file Templates.h.
| using Mcro::Templates::TLastTypeAtPackDecay = std::decay_t<typename TTypeAtPack_Struct<sizeof...(Rest) - I - 1, Rest...>::Type> |
Get a specific item from the end of a parameter pack at given index (0 == last) disregarding CV-ref qualifiers. It is an unspecified compile error to index an empty parameter pack.
Definition at line 83 of file Templates.h.
| using Mcro::Templates::TTemplate_Param = typename TTemplate_Struct<Instance>::template Param<I> |
Get a type parameter at a specified position of a templated instance.
Definition at line 467 of file Templates.h.
| using Mcro::Templates::TTemplate_ParamDecay = typename TTemplate_Struct<Instance>::template ParamDecay<I> |
Get a decayed type parameter at a specified position of a templated instance.
Definition at line 478 of file Templates.h.
| using Mcro::Templates::TTemplate_Params = typename TTemplate_Struct<Instance>::Parameters |
Get template type parameters as a tuple.
Definition at line 445 of file Templates.h.
| using Mcro::Templates::TTemplate_ParamsDecay = typename TTemplate_Struct<Instance>::ParametersDecay |
Get decayed template type parameters as a tuple.
Definition at line 456 of file Templates.h.
| using Mcro::Templates::TTemplateMap = typename TTemplateMap_Struct<TemplateOut, FromInstance>::Type |
Transfer parameters from one template to another. Or in other words replace the template part of the input template instance with TemplateOut.
Definition at line 533 of file Templates.h.
| using Mcro::Templates::TTypeAtPack = typename TTypeAtPack_Struct<I, Rest...>::Type |
Get a specific item from a parameter pack at given index. It is an unspecified compile error to index an empty parameter pack.
Definition at line 59 of file Templates.h.
| using Mcro::Templates::TTypeAtPackDecay = std::decay_t<typename TTypeAtPack_Struct<I, Rest...>::Type> |
Get a specific item from a parameter pack at given index disregarding CV-ref qualifiers. It is an unspecified compile error to index an empty parameter pack.
Definition at line 75 of file Templates.h.
| using Mcro::Templates::TTypes_Get = T::template Get<I> |
Definition at line 128 of file Templates.h.
| using Mcro::Templates::TTypes_GetDecay = T::template GetDecay<I> |
Definition at line 131 of file Templates.h.
| using Mcro::Templates::TTypesSkip = typename TTypesSkip_Struct<Count, T>::Type |
Skip the first Count elements of the input type-list
Definition at line 158 of file Templates.h.
| using Mcro::Templates::TTypesTake = typename TTypesTake_Struct<Count, T>::Type |
Take only the first Count elements of the input type-list
Definition at line 200 of file Templates.h.
| using Mcro::Templates::TTypesTrimEnd = typename TTypesTrimEnd_Struct<Count, T>::Type |
Disregard the last Count elements of the input type-list
Definition at line 179 of file Templates.h.
|
constexpr |
Tired of typing const_cast<FMyLongUnwieldyTypeName>(...)? use this instead.
Definition at line 537 of file Templates.h.
|
constexpr |
Tired of typing const_cast<FMyLongUnwieldyTypeName*>(...)? use this instead.
Definition at line 553 of file Templates.h.
|
constexpr |
Tired of typing const_cast<FMyLongUnwieldyTypeName*>(...)? use this instead.
Definition at line 557 of file Templates.h.
|
constexpr |
Tired of typing const_cast<FMyLongUnwieldyTypeName>(...)? use this instead.
Definition at line 545 of file Templates.h.
|
constexpr |
Tired of typing const_cast<FMyLongUnwieldyTypeName*>(...)? use this instead.
Definition at line 565 of file Templates.h.
|
constexpr |
Tired of typing const_cast<FMyLongUnwieldyTypeName*>(...)? use this instead.
Definition at line 561 of file Templates.h.
|
inlineconstexpr |
Get the number of template type parameters from a specified templated instance (which only has type parameters)
Definition at line 504 of file Templates.h.