dune-typetree  2.5-dev
Dune::TypeTree::index_pack< i > Struct Template Reference

Simple holder class for a template argument pack of indices. More...

#include <dune/typetree/utility.hh>

Detailed Description

template<std::size_t... i>
struct Dune::TypeTree::index_pack< i >

Simple holder class for a template argument pack of indices.

The main use of index_pack is to unpack variadically templated data structures like this:

template<typename T, typename F, std::size_t... i>
void apply_to_tuple(const T& t, F f, index_pack<i...> indices)
{
discard((f(get<i>(t)),0)...);
}
std::tuple<int,double,...,char> t;
See also
tuple_indices()
discard()

The documentation for this struct was generated from the following file: