dune-common
2.2.0
|
Helper template to append a type to a tuple. More...
#include <dune/common/tupleutility.hh>
Public Types | |
typedef Tuple | type |
For all specializations this is the type of a tuple with T appended. | |
Public Member Functions | |
dune_static_assert (AlwaysFalse< Tuple >::value,"Attempt to use the ""unspecialized version of PushBackTuple. ""PushBackTuple needs to be specialized for ""each possible tuple size. Naturally the number of ""pre-defined specializations is limited arbitrarily. ""Maybe you need to raise this limit by defining some ""more specializations?") |
Helper template to append a type to a tuple.
Tuple | The tuple type to extend |
T | The type to be appended to the tuple |
With variadic templates the generic specialization would be:
template<class... TupleArgs, class T> struct PushBackTuple<typename Dune::tuple<TupleArgs...>, T> { typedef typename Dune::tuple<TupleArgs..., T> type; };
typedef Tuple Dune::PushBackTuple< Tuple, T >::type |
For all specializations this is the type of a tuple with T appended.
Suppose you have Tuple=tuple<T1, T2, ..., TN> then this type is tuple<T1, T2, ..., TN, T>.
Dune::PushBackTuple< Tuple, T >::dune_static_assert | ( | AlwaysFalse< Tuple >::value | , |
"Attempt to use the ""unspecialized version of PushBackTuple< Tuple, T >. ""PushBackTuple< Tuple, T > needs to be specialized for ""each possible tuple size. Naturally the number of ""pre-defined specializations is limited arbitrarily. ""Maybe you need to raise this limit by defining some ""more specializations?" | |||
) |