libMesh
Loading...
Searching...
No Matches
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
7namespace libMesh
8{
9
10// Recursive tuple scheme
11template <std::size_t Index, typename T>
12struct tuple_n
13{
14 template< typename...Args> using type = typename tuple_n<Index-1, T>::template type<T, Args...>;
15};
16
17template <typename T>
18struct tuple_n<0, T>
19{
20 template<typename...Args> using type = std::tuple<Args...>;
21};
22template <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, T >::template type<> tuple_of
Definition tuple_of.h:22
std::tuple< Args... > type
Definition tuple_of.h:20
typename tuple_n< Index-1, T >::template type< T, Args... > type
Definition tuple_of.h:14