43 template <
typename T,
typename I, I N,
44 typename Enable =
void>
45 struct get_integer_sequence_aux
50 estd::make_integer_sequence<I, N> >;
53 template <
typename T,
typename I, I N>
54 struct get_integer_sequence_aux<
55 T, I, N, estd::
void_t<decltype(get<N>(std::declval<T>()))> >
56 : get_integer_sequence_aux<T, I, N + 1>
59 template <
typename T,
typename I>
60 struct get_integer_sequence
61 : get_integer_sequence_aux<T, I, 0>
64 template <
typename ...Ts,
typename I>
65 struct get_integer_sequence<
std::tuple<Ts...>, I>
67 using type = estd::make_integer_sequence<I,
sizeof...(Ts)>;
70 template <
typename T,
typename U,
typename I>
71 struct get_integer_sequence<
std::pair<T, U>, I>
73 using type = estd::make_integer_sequence<I, 2>;
76 template <
typename T, std::
size_t N,
typename I>
77 struct get_integer_sequence<
std::array<T, N>, I>
79 using type = estd::make_integer_sequence<I, N>;
84 template <
typename T,
typename I>
85 using get_integer_sequence =
86 typename detail::get_integer_sequence<estd::decay_t<T>, I>::type;
89 using get_index_sequence = get_integer_sequence<T, std::size_t>;
typename detail::make_void< Ts... >::type void_t
Similar to C++17 std::void_t.
typename std::conditional< X, T, F >::type conditional_t
Similar to C++14 std::conditional_t.
C++ amazing templates and reusable implementations awesomeness.