15 #ifndef dealii_cxx14_utility_h 16 #define dealii_cxx14_utility_h 18 #include <deal.II/base/config.h> 22 #ifndef DEAL_II_WITH_CXX14 24 # include <type_traits> 27 DEAL_II_NAMESPACE_OPEN
30 #ifdef DEAL_II_WITH_CXX14 31 using std::index_sequence;
32 using std::make_index_sequence;
33 using std::index_sequence_for;
35 template <
size_t... Ints>
38 using type = index_sequence;
39 using value_type = size_t;
40 static constexpr std::size_t size() noexcept {
return sizeof...(Ints); }
46 template <
class Sequence1,
class Sequence2>
47 struct merge_and_renumber;
49 template <
size_t... I1,
size_t... I2>
50 struct merge_and_renumber<index_sequence<I1...>, index_sequence<I2...>>
51 : index_sequence<I1..., (sizeof...(I1)+I2)...>
57 struct make_index_sequence
58 : internal::merge_and_renumber<typename make_index_sequence<N/2>::type,
59 typename make_index_sequence<N - N/2>::type>
62 template<>
struct make_index_sequence<0> : index_sequence<> { };
63 template<>
struct make_index_sequence<1> : index_sequence<0> { };
66 using index_sequence_for = make_index_sequence<
sizeof...(T)>;
69 DEAL_II_NAMESPACE_CLOSE
71 #endif // dealii_cxx14_memory_h