34 template <
typename T, T ...Ints>
38 static constexpr std::size_t size()
40 return sizeof...(Ints);
44 template<std::size_t... Ints>
49 template <
typename T, T Curr, T Limit,
typename Accum>
50 struct make_integer_sequence;
52 template <
typename T, T Limit, T ...Ns>
58 template <
typename T, T Curr, T Limit, T ...Ns>
59 struct make_integer_sequence<T, Curr, Limit, integer_sequence<T, Ns...>>
60 : make_integer_sequence<
61 T, (Curr + 1), Limit, integer_sequence<T, Ns..., Curr>
67 template<
class T, T N>
68 using make_integer_sequence =
typename detail::make_integer_sequence<
69 T, 0, N, integer_sequence<T> >::type;
71 template<std::
size_t N>
72 using make_index_sequence = make_integer_sequence<std::size_t, N>;
C++ amazing templates and reusable implementations awesomeness.