13 #ifndef TINYMPL_VARIADIC_GENERATE_N_HPP
14 #define TINYMPL_VARIADIC_GENERATE_N_HPP
16 #include <type_traits>
35 template<std::size_t n,
36 template<
class ...>
class Gen,
39 template< std::size_t n,
template<
class ...>
class Gen,
template<
class ...>
43 template<
int i,
class ... Ts>
45 typedef typename Gen< std::integral_constant<int, i> >::type new_type;
46 typedef typename generate_n < n - 1, Gen, Out >::
47 template impl < i + 1, Ts..., new_type >::type type;
50 template<std::size_t,
template<
class ...>
class,
template<
class ...>
class>
54 typedef typename impl<0>::type type;
57 template<
template<
class ...>
class Gen,
template<
class ...>
class Out>
60 template<
int i,
class ... Ts>
62 typedef Out<Ts...> type;
65 template<std::size_t,
template<
class ...>
class,
template<
class ...>
class>
66 friend struct generate_n;
69 typedef typename impl<0>::type type;
75 #endif // TINYMPL_VARIADIC_GENERATE_N_HPP
Generate n elements using a given generator metafunction.
Definition: generate_n.hpp:37
Generate N elements using a given generator metafunction.
Definition: generate_n.hpp:36