dune-typetree  2.5.0
Classes | Namespaces | Typedefs | Functions
utility.hh File Reference
#include <memory>
#include <tuple>
#include <type_traits>
#include <utility>
#include <dune/common/shared_ptr.hh>
#include <dune/common/indices.hh>
#include <dune/typetree/nodeinterface.hh>
#include <dune/typetree/nodetags.hh>

Go to the source code of this file.

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...
 
struct  Dune::TypeTree::apply_to_tuple_policy::no_pass_index
 Do not pass the index of the current tuple to the functor. More...
 
struct  Dune::TypeTree::apply_to_tuple_policy::pass_index
 Pass the index of the current tuple to the functor as its first argument in a std::integral_constant. More...
 

Namespaces

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

Typedefs

typedef no_pass_index Dune::TypeTree::apply_to_tuple_policy::default_policy
 Default policy. 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...