dune-typetree  2.5.0
Modules | Namespaces | Classes | Functions
dune-typetree
Collaboration diagram for dune-typetree:

Modules

 Traversal
 
 Child Extraction
 
 Nodes
 
 TreePath
 
 Transformation
 

Namespaces

 Dune::TypeTree::apply_to_tuple_policy
 Policies for the function apply_to_tuple().
 

Classes

struct  Dune::TypeTree::TreeInfo< Tree, Tag >
 Struct for obtaining some basic structural information about a TypeTree. More...
 
struct  Dune::TypeTree::index_pack< i >
 Simple holder class for a template argument pack of indices. More...
 
struct  Dune::TypeTree::index_pack_builder< n, i >
 TMP to build an index_pack containing the sequence 0,...,n-1. More...
 
struct  Dune::TypeTree::tuple_index_pack_builder< tuple >
 TMP to build an index_pack for all elements in the tuple. More...
 

Functions

template<typename tuple >
tuple_index_pack_builder< tuple >::type Dune::TypeTree::tuple_indices (const tuple &t)
 Generate an index_pack for the tuple t. More...
 
template<std::size_t n>
index_pack_builder< n >::type Dune::TypeTree::index_range (std::integral_constant< std::size_t, n >={})
 Generate an index_pack with the values {0, 1, ..., n-1}. More...
 
template<typename... Args>
void Dune::TypeTree::discard (Args &&... args)
 No-op function to make calling a function on a variadic template argument pack legal C++. More...
 
template<typename T , typename F , typename Policy >
void Dune::TypeTree::apply_to_tuple (T &&t, F &&f, Policy=apply_to_tuple_policy::default_policy())
 Apply a functor to each element of a std::tuple. More...
 

Detailed Description

Function Documentation

◆ apply_to_tuple()

template<typename T , typename F , typename Policy >
void Dune::TypeTree::apply_to_tuple ( T &&  t,
F &&  f,
Policy  = apply_to_tuple_policy::default_policy() 
)

Apply a functor to each element of a std::tuple.

◆ discard()

template<typename... Args>
void Dune::TypeTree::discard ( Args &&...  args)

No-op function to make calling a function on a variadic template argument pack legal C++.

See also
index_pack

◆ index_range()

template<std::size_t n>
index_pack_builder<n>::type Dune::TypeTree::index_range ( std::integral_constant< std::size_t, n >  = {})

Generate an index_pack with the values {0, 1, ..., n-1}.

Template Parameters
nThe length of the index pack.
Returns
index_pack<0,1,...,n-1>.

◆ tuple_indices()

template<typename tuple >
tuple_index_pack_builder<tuple>::type Dune::TypeTree::tuple_indices ( const tuple &  t)

Generate an index_pack for the tuple t.