libMesh
tuple_of.h
Go to the documentation of this file.
1 #ifndef LIBMESH_TUPLE_OF_H
2 #define LIBMESH_TUPLE_OF_H
3 
4 #include <cstddef> // size_t
5 #include <tuple>
6 
7 namespace libMesh
8 {
9 
10 // Recursive tuple scheme
11 template <std::size_t Index, typename T>
12 struct tuple_n
13 {
14  template< typename...Args> using type = typename tuple_n<Index-1, T>::template type<T, Args...>;
15 };
16 
17 template <typename T>
18 struct tuple_n<0, T>
19 {
20  template<typename...Args> using type = std::tuple<Args...>;
21 };
22 template <std::size_t Index, typename T> using tuple_of = typename tuple_n<Index,T>::template type<>;
23 
24 }
25 
26 #endif
The libMesh namespace provides an interface to certain functionality in the library.
typename tuple_n< Index-1, T >::template type< T, Args... > type
Definition: tuple_of.h:14
typename tuple_n< Index, T >::template type<> tuple_of
Definition: tuple_of.h:22
std::tuple< Args... > type
Definition: tuple_of.h:20