24#ifndef MORPHEUS_IMPL_METAPROGRAMMING_HPP
25#define MORPHEUS_IMPL_METAPROGRAMMING_HPP
31template <
typename... Ts>
33template <
typename... Ts>
36struct IndexedTypeList;
38template <
typename T,
typename U>
40template <
typename... T>
45template <
typename T,
typename U>
47template <
typename... T>
50template <
typename... Ts,
typename... Us>
51struct concat<TypeList<Ts...>, TypeList<Us...>> {
52 using type = TypeList<Ts..., Us...>;
56template <
typename... Us>
57struct cross_product<TypeList<>, TypeList<Us...>> {
58 using type = TypeList<>;
61template <
typename... Us>
62struct cross_product<TypeList<Us...>, TypeList<>> {
63 using type = TypeList<>;
67struct cross_product<TypeList<>, TypeList<>> {
68 using type = TypeList<>;
72template <
typename T,
typename... Ts,
typename U,
typename... Us>
73struct cross_product<TypeList<T, Ts...>, TypeList<U, Us...>> {
74 using type =
typename concat<
77 typename cross_product<TypeList<T>, TypeList<Us...>>::type>::type,
78 typename cross_product<TypeList<Ts...>, TypeList<U, Us...>>::type>::type;
86template <
typename... T,
typename... Ts,
typename U,
typename... Us>
87struct cross_product<TypeList<Set<T...>, Ts...>, TypeList<U, Us...>> {
88 using type =
typename concat<
89 typename concat<TypeList<Set<T..., U>>,
90 typename cross_product<TypeList<Set<T...>>,
91 TypeList<Us...>>::type>::type,
92 typename cross_product<TypeList<Ts...>, TypeList<U, Us...>>::type>::type;
100template <
typename T,
typename... Ts,
typename... U,
typename... Us>
101struct cross_product<TypeList<T, Ts...>, TypeList<Set<U...>, Us...>> {
102 using type =
typename concat<
104 TypeList<Set<T, U...>>,
105 typename cross_product<TypeList<T>, TypeList<Us...>>::type>::type,
106 typename cross_product<TypeList<Ts...>,
107 TypeList<Set<U...>, Us...>>::type>::type;
115template <
typename... T,
typename... Ts,
typename... U,
typename... Us>
116struct cross_product<TypeList<Set<T...>, Ts...>, TypeList<Set<U...>, Us...>> {
117 using type =
typename concat<
118 typename concat<TypeList<Set<T..., U...>>,
119 typename cross_product<TypeList<Set<T...>>,
120 TypeList<Us...>>::type>::type,
121 typename cross_product<TypeList<Ts...>,
122 TypeList<Set<U...>, Us...>>::type>::type;
Generic Morpheus interfaces.
Definition: dummy.cpp:24