15 #ifndef dealii_cxx14_utility_h
16 #define dealii_cxx14_utility_h
22 #ifndef DEAL_II_WITH_CXX14
24 # include <type_traits>
31 #ifdef DEAL_II_WITH_CXX14
32 using std::index_sequence;
33 using std::index_sequence_for;
34 using std::make_index_sequence;
38 template <
size_t... Ints>
41 using type = index_sequence;
43 static constexpr std::size_t
46 return sizeof...(Ints);
53 template <
class Sequence1,
class Sequence2>
54 struct merge_and_renumber;
56 template <
size_t... I1,
size_t... I2>
57 struct merge_and_renumber<index_sequence<I1...>, index_sequence<I2...>>
58 : index_sequence<I1..., (sizeof...(I1) + I2)...>
63 template <std::
size_t N>
64 struct make_index_sequence : internal::merge_and_renumber<
65 typename make_index_sequence<N / 2>::type,
66 typename make_index_sequence<N - N / 2>::type>
70 struct make_index_sequence<0> : index_sequence<>
73 struct make_index_sequence<1> : index_sequence<0>
77 using index_sequence_for = make_index_sequence<
sizeof...(T)>;
83 #endif // dealii_cxx14_memory_h