Made some Meta stuff more generic
This commit is contained in:
parent
de07c8ad1a
commit
c3f90ec6b0
4 changed files with 12 additions and 12 deletions
|
@ -14,8 +14,8 @@ namespace EC
|
||||||
using type = TypeList<>;
|
using type = TypeList<>;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename... TypesA, typename... TypesB>
|
template <template <typename...> class TTypeListA, template <typename...> class TTypeListB, typename... TypesA, typename... TypesB>
|
||||||
struct CombineHelper<TypeList<TypesA...>, TypeList<TypesB...> >
|
struct CombineHelper<TTypeListA<TypesA...>, TTypeListB<TypesB...> >
|
||||||
{
|
{
|
||||||
using type = TypeList<TypesA..., TypesB...>;
|
using type = TypeList<TypesA..., TypesB...>;
|
||||||
};
|
};
|
||||||
|
|
|
@ -15,12 +15,12 @@ namespace EC
|
||||||
{
|
{
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T, typename Type, typename... Types>
|
template <typename T, template <typename...> class TTypeList, typename Type, typename... Types>
|
||||||
struct ContainsHelper<T, TypeList<Type, Types...> > :
|
struct ContainsHelper<T, TTypeList<Type, Types...> > :
|
||||||
std::conditional<
|
std::conditional<
|
||||||
std::is_same<T, Type>::value,
|
std::is_same<T, Type>::value,
|
||||||
std::true_type,
|
std::true_type,
|
||||||
ContainsHelper<T, TypeList<Types...> >
|
ContainsHelper<T, TTypeList<Types...> >
|
||||||
>::type
|
>::type
|
||||||
{
|
{
|
||||||
};
|
};
|
||||||
|
|
|
@ -15,8 +15,8 @@ namespace EC
|
||||||
{
|
{
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename Type, typename... Types, typename TTypeListB>
|
template <template <typename...> class TTypeListA, typename Type, typename... Types, typename TTypeListB>
|
||||||
struct ContainsAllHelper<TypeList<Type, Types...>, TTypeListB> :
|
struct ContainsAllHelper<TTypeListA<Type, Types...>, TTypeListB> :
|
||||||
std::conditional<
|
std::conditional<
|
||||||
Contains<Type, TTypeListB>::value,
|
Contains<Type, TTypeListB>::value,
|
||||||
ContainsAllHelper<TypeList<Types...>, TTypeListB>,
|
ContainsAllHelper<TypeList<Types...>, TTypeListB>,
|
||||||
|
|
|
@ -13,16 +13,16 @@ namespace EC
|
||||||
{
|
{
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T, typename... Types>
|
template <typename T, template <typename...> class TTypeList, typename... Types>
|
||||||
struct IndexOf<T, TypeList<T, Types...> > :
|
struct IndexOf<T, TTypeList<T, Types...> > :
|
||||||
std::integral_constant<std::size_t, 0>
|
std::integral_constant<std::size_t, 0>
|
||||||
{
|
{
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T, typename Type, typename... Types>
|
template <typename T, template <typename...> class TTypeList, typename Type, typename... Types>
|
||||||
struct IndexOf<T, TypeList<Type, Types...> > :
|
struct IndexOf<T, TTypeList<Type, Types...> > :
|
||||||
std::integral_constant<std::size_t, 1 +
|
std::integral_constant<std::size_t, 1 +
|
||||||
IndexOf<T, TypeList<Types...> >::value
|
IndexOf<T, TTypeList<Types...> >::value
|
||||||
>
|
>
|
||||||
{
|
{
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue