14#include "CoreMinimal.h"
33 template <CIsTypeList Bases,
typename Function>
36 template <
typename T,
typename Function>
39 function.template operator()<T> ();
41 ForEachExplicitBase<typename T::Bases>(
FWD(function));
44 template <CIsTypeList Bases,
typename Function,
size_t... Indices>
47 (ForEachExplicitBase_Body<TTypes_Get<Bases, Indices>>(
FWD(function)), ...);
50 template <CIsTypeList Bases,
typename Function>
53 ForEachExplicitBase_Impl<Bases>(
55 std::make_index_sequence<Bases::Count>()
81 template <
typename T,
typename Function>
82 requires (CHasBases<T> || CIsTypeList<T>)
87 if constexpr (CIsTypeList<T>)
91 template <
typename T,
typename Bases>
92 requires (CHasBases<Bases> || CIsTypeList<Bases>)
98 if constexpr (CSameAsDecayed<T, Base>)
104 template <
typename T,
typename Bases>
122 template <
typename... BaseTypes>
152 template <
typename Self,
typename Function>
#define FWD(...)
Shorten forwarding expression with this macro so one may not need to specify explicit type.
Inherit via this template to allow other API to reflect upon the base types of deriving class....
constexpr void ForEachBase(this Self &&, Function &&function)
Operate on each of the explicit base class of this type with a lambda function template....
Some MCRO utilities allow for intrusive method of declaring inheritance which can be later used to re...
constexpr void ForEachExplicitBase_Body(Function &&function)
constexpr void ForEachExplicitBase_Impl(Function &&function, std::index_sequence< Indices... > &&)
constexpr void ForEachExplicitBase(Function &&function)
constexpr bool HasExplicitBase()
constexpr void ForEachExplicitBase(Function &&function)
Operate on each of the explicitly listed base classes of a given type with a lambda function template...
This namespace provides templating utilities and introspection into template instantiations.
This template is used to store pack of types in other templates, or to allow parameter pack inference...