1#ifndef DUNE_COMMON_STD_UTILITY_HH
2#define DUNE_COMMON_STD_UTILITY_HH
16#if __cpp_lib_integer_sequence >= 201304
18 using std::integer_sequence;
19 using std::index_sequence;
20 using std::make_integer_sequence;
21 using std::make_index_sequence;
22 using std::index_sequence_for;
34 template<
class T, T... Ints >
37 static_assert( std::is_integral< T >::value,
"Template parameter T is required to be an integral type" );
45 static constexpr std::size_t
size () {
return sizeof...( Ints ); }
53 template< std::size_t... Ints >
60 template<
typename T, T i, T n, T... indices>
61 struct _make_integer_sequence
62 :
public _make_integer_sequence<T,i+1,n,indices...,i>
65 template<
typename T, T n, T... indices>
66 struct _make_integer_sequence<T,n,n,indices...>
75 template<
typename T, T n>
78 template<std::
size_t n>
91 template<
typename... T>
92 struct _get_pack_length
93 :
public std::integral_constant<std::size_t,sizeof...(T)>
100 template<
typename... T>
Dune namespace.
Definition alignment.hh:11
typename impl::_make_integer_sequence< T, 0, n >::type make_integer_sequence
Definition utility.hh:76
integer_sequence< std::size_t, Ints... > index_sequence
std::index_sequence as introduced in C++14
Definition utility.hh:54
make_integer_sequence< std::size_t, n > make_index_sequence
Definition utility.hh:79
make_index_sequence< impl::_get_pack_length< T... >{}> index_sequence_for
Definition utility.hh:101
an implementation of std::integer_sequence as introduced in C++14
Definition utility.hh:36
static constexpr std::size_t size()
return number of elements in sequence
Definition utility.hh:45
T value_type
value type
Definition utility.hh:42