23 #ifndef PAAL_TYPES_VECTOR_HPP
24 #define PAAL_TYPES_VECTOR_HPP
26 #include <type_traits>
29 namespace data_structures {
35 template <
typename Vec>
struct size;
40 value =
sizeof...(Args)
45 template <
typename Vector,
typename StartValue,
typename Functor>
struct fold;
48 template <
typename StartValue,
typename Functor,
typename Arg,
typename... Args>
50 typedef typename fold<
52 typename Functor::template apply<StartValue, Arg>::type, Functor>::type
57 template <
typename StartValue,
typename Functor>
59 typedef StartValue type;
63 template <
typename Vector,
typename Val>
struct push_back;
66 template <
typename Val,
typename... Args>
72 template <
typename Vector,
typename Id>
struct at;
75 template <
typename C, C i,
typename Arg,
typename... Args>
77 typedef typename at<Args..., std::integral_constant<C, i - 1>>::type type;
81 template <
typename C,
typename Arg,
typename... Args>
87 template <
typename V1,
typename V2>
struct join;
90 template <
typename... Args1,
typename... Args2>
99 template <
int n,
typename Arg,
typename... Args>
105 template <
typename Arg,
typename... Args>
116 template <
typename Type,
typename TypesVector>
struct pos;
119 template <
typename Type,
typename TypesPrefix,
typename... TypesSufix>
129 template <
typename Type,
typename... TypesSufix>
137 template <
int pos,
typename NewType,
typename TypesVector>
141 template <
int pos,
typename NewType,
typename TypesPrefix,
142 typename... TypesSufix>
144 typedef typename join<
151 template <
typename NewType,
typename TypesPrefix,
typename... TypesSufix>
159 #endif // PAAL_TYPES_VECTOR_HPP
Standard fold function implementation.
Computes size of TypesVector.
replace element at pos to NewType
push back given val to TypesVector
returns pos of the element in the TypesVector
gives element on id in TypesVector
removes first n elements from given TypesVector