dune-typetree  2.4-dev
Classes | Namespaces | Typedefs | Functions | Variables
utility.hh File Reference
#include <memory>
#include <tuple>
#include <type_traits>
#include <dune/common/shared_ptr.hh>
#include <dune/common/std/utility.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::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().
 

Typedefs

template<std::size_t... indices>
using Dune::TypeTree::Std::index_sequence = integer_sequence< std::size_t, indices...>
 A sequence of indices, with each entry a std::size_t. More...
 
template<typename T , T n>
using Dune::TypeTree::Std::make_integer_sequence = decltype(Dune::Std::make_integer_sequence< T, n >())
 Create an integer_sequence [0,n-1] with entries of type T. More...
 
template<std::size_t n>
using Dune::TypeTree::Std::make_index_sequence = make_integer_sequence< std::size_t, n >
 Create an index_sequence [0,n-1]. More...
 
template<typename... T>
using Dune::TypeTree::Std::index_sequence_for = make_index_sequence< impl::_get_pack_length< T...>{}>
 Create an index_sequence for the pack T..., i.e. [0,sizeof...(T)]. More...
 
template<std::size_t i>
using Dune::TypeTree::index_constant = std::integral_constant< std::size_t, i >
 An index constant with value i. More...
 
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...
 

Variables

constexpr index_constant< 0 > Dune::TypeTree::Indices::_0 = {}
 Compile time index with value 0. More...
 
constexpr index_constant< 1 > Dune::TypeTree::Indices::_1 = {}
 Compile time index with value 1. More...
 
constexpr index_constant< 2 > Dune::TypeTree::Indices::_2 = {}
 Compile time index with value 2. More...
 
constexpr index_constant< 3 > Dune::TypeTree::Indices::_3 = {}
 Compile time index with value 3. More...
 
constexpr index_constant< 4 > Dune::TypeTree::Indices::_4 = {}
 Compile time index with value 4. More...
 
constexpr index_constant< 5 > Dune::TypeTree::Indices::_5 = {}
 Compile time index with value 5. More...
 
constexpr index_constant< 6 > Dune::TypeTree::Indices::_6 = {}
 Compile time index with value 6. More...
 
constexpr index_constant< 7 > Dune::TypeTree::Indices::_7 = {}
 Compile time index with value 7. More...
 
constexpr index_constant< 8 > Dune::TypeTree::Indices::_8 = {}
 Compile time index with value 8. More...
 
constexpr index_constant< 9 > Dune::TypeTree::Indices::_9 = {}
 Compile time index with value 9. More...
 
constexpr index_constant< 10 > Dune::TypeTree::Indices::_10 = {}
 Compile time index with value 10. More...
 
constexpr index_constant< 11 > Dune::TypeTree::Indices::_11 = {}
 Compile time index with value 11. More...
 
constexpr index_constant< 12 > Dune::TypeTree::Indices::_12 = {}
 Compile time index with value 12. More...
 
constexpr index_constant< 13 > Dune::TypeTree::Indices::_13 = {}
 Compile time index with value 13. More...
 
constexpr index_constant< 14 > Dune::TypeTree::Indices::_14 = {}
 Compile time index with value 14. More...
 
constexpr index_constant< 15 > Dune::TypeTree::Indices::_15 = {}
 Compile time index with value 15. More...
 
constexpr index_constant< 16 > Dune::TypeTree::Indices::_16 = {}
 Compile time index with value 16. More...
 
constexpr index_constant< 17 > Dune::TypeTree::Indices::_17 = {}
 Compile time index with value 17. More...
 
constexpr index_constant< 18 > Dune::TypeTree::Indices::_18 = {}
 Compile time index with value 18. More...
 
constexpr index_constant< 19 > Dune::TypeTree::Indices::_19 = {}
 Compile time index with value 19. More...