22 #ifndef LELY_LIBC_UTILITY_HPP_
23 #define LELY_LIBC_UTILITY_HPP_
32 #if __cplusplus >= 201402L
34 using ::std::index_sequence;
35 using ::std::index_sequence_for;
36 using ::std::integer_sequence;
37 using ::std::make_index_sequence;
38 using ::std::make_integer_sequence;
43 template <
typename T, T... Ints>
47 static constexpr ::std::size_t
49 return sizeof...(Ints);
55 template <::std::size_t...>
58 template <
class,
class>
61 template <::std::size_t... I1, ::std::size_t... I2>
66 template <::std::
size_t N>
69 typename make_index_tuple<N - N / 2>::type> {};
81 template <class T, T N, class = typename make_index_tuple<N>::type>
84 template <
typename T, T N, ::std::size_t... Ints>
86 static_assert(N >= 0,
"Cannot make integer sequence of negative length");
97 template <::std::size_t... Ints>
104 template <
typename T, T N>
112 template <::std::
size_t N>
119 template <
typename... T>
This header file is part of the Lely libraries; it contains the compiler feature definitions.
A compile-time sequence of integers.
make_index_sequence< sizeof...(T)> index_sequence_for
A helper alias template to convert any type parameter pack into an index sequence of the same length.
typename detail::make_integer_sequence< T, N >::type make_integer_sequence
A helper alias template to simplify the creation of lely::compat::integer_sequence types with 0,...
make_integer_sequence<::std::size_t, N > make_index_sequence
A helper alias template for make_integer_sequence for the common case where T is std::size_t.