dune-typetree
2.4.1
|
![]() |
Modules | |
Traversal | |
Child Extraction | |
Nodes | |
TreePath | |
Transformation | |
Namespaces | |
Dune::TypeTree::Std | |
Dune::TypeTree::Indices | |
Namespace with predefined compile time indices for the range [0,19]. | |
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... | |
Typedefs | |
template<std::size_t i> | |
using | Dune::TypeTree::index_constant = std::integral_constant< std::size_t, i > |
An index constant with value i. 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... | |
using Dune::TypeTree::index_constant = typedef std::integral_constant<std::size_t, i> |
An index constant with value i.
An index constant is a simple type alias for an integral_constant. Its main advantages are clarity (it is easier to see that code uses it as an index) and the fact that the integral type is fixed, reducing verbosity and avoiding the problem of maybe trying to overload / specialize using a different integral type.
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.
void Dune::TypeTree::discard | ( | Args &&... | args | ) |
No-op function to make calling a function on a variadic template argument pack legal C++.
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}.
n | The length of the index pack. |
tuple_index_pack_builder<tuple>::type Dune::TypeTree::tuple_indices | ( | const tuple & | t | ) |
Generate an index_pack for the tuple t.