29 #ifndef VC_COMMON_INDEXSEQUENCE_H_
30 #define VC_COMMON_INDEXSEQUENCE_H_
34 namespace Vc_VERSIONED_NAMESPACE
40 template <std::size_t... I>
struct index_sequence
42 static constexpr std::size_t size() noexcept {
return sizeof...(I); }
49 template <std::
size_t N,
typename Prev =
void>
struct make_index_sequence_impl;
51 template <>
struct make_index_sequence_impl<0, void>
53 using type = index_sequence<>;
56 template <std::
size_t N>
struct make_index_sequence_impl<N, void>
58 using type =
typename make_index_sequence_impl<
59 N,
typename make_index_sequence_impl<N - 1>::type>::type;
62 template <std::size_t N, std::size_t... Ns>
63 struct make_index_sequence_impl<N, index_sequence<Ns...>>
65 using type = index_sequence<Ns..., N - 1>;
71 template <std::
size_t N>
72 using make_index_sequence =
typename make_index_sequence_impl<N>::type;
75 #endif // VC_COMMON_INDEXSEQUENCE_H_