4#ifndef DUNE_TYPETREE_TYPETRAITS_HH
5#define DUNE_TYPETREE_TYPETRAITS_HH
8#include <dune/common/typetraits.hh>
18 template<
typename... T>
21 template<
typename T0,
typename... T>
41 constexpr static bool value =
sizeof(test<T>(0)) ==
sizeof(
yes);
44 template<
typename T,
typename V>
59 constexpr static bool value =
sizeof(test<T>(0)) ==
sizeof(
yes);
74 constexpr static bool value =
sizeof(test<T>(0)) ==
sizeof(
yes);
77 template<
typename T,
typename V>
92 constexpr static bool value =
sizeof(test<T>(0)) ==
sizeof(
yes);
141 typedef typename std::conditional<
142 std::is_base_of<meta_function,F>::value,
156 return std::false_type();
164 return std::true_type();
181 public decltype(impl::isTreePath((typename std::decay<T>::type*)(nullptr)))
typename std::decay_t< Node >::NodeTag NodeTag
Returns the node tag of the given Node.
Definition: nodeinterface.hh:76
typename std::decay_t< T >::ImplementationTag ImplementationTag
Returns the implementation tag of the given Node.
Definition: nodeinterface.hh:80
Definition: accumulate_static.hh:13
constexpr auto isTreePath(const T &) -> IsTreePath< T >
Check if given object represents a tree path.
Definition: typetraits.hh:191
T * declptr()
Helper function for generating a pointer to a value of type T in an unevaluated operand setting.
constexpr auto isTreePath(void *) -> std::false_type
Definition: typetraits.hh:153
A hybrid version of TreePath that supports both compile time and run time indices.
Definition: treepath.hh:79
Definition: typetraits.hh:19
T0 type
Definition: typetraits.hh:24
Definition: typetraits.hh:31
static constexpr bool value
True if class T defines a NodeTag.
Definition: typetraits.hh:41
static yes test(NodeTag< X > *)
Definition: typetraits.hh:32
char dummy[1]
Definition: typetraits.hh:32
Definition: typetraits.hh:33
char dummy[2]
Definition: typetraits.hh:33
Definition: typetraits.hh:46
static maybe< std::is_base_of< V, NodeTag< X > >::value > test(NodeTag< X > *a)
static constexpr bool value
True if class T defines a NodeTag of type V.
Definition: typetraits.hh:59
Definition: typetraits.hh:48
char dummy[N+1]
Definition: typetraits.hh:48
Definition: typetraits.hh:49
char dummy[2]
Definition: typetraits.hh:49
Definition: typetraits.hh:50
char dummy[1]
Definition: typetraits.hh:50
Definition: typetraits.hh:64
static yes test(ImplementationTag< X > *)
static constexpr bool value
True if class T defines an ImplementationTag.
Definition: typetraits.hh:74
Definition: typetraits.hh:65
char dummy[1]
Definition: typetraits.hh:65
Definition: typetraits.hh:66
char dummy[2]
Definition: typetraits.hh:66
Definition: typetraits.hh:79
static maybe< std::is_base_of< V, ImplementationTag< X > >::value > test(ImplementationTag< X > *a)
static constexpr bool value
True if class T defines an ImplementationTag of type V.
Definition: typetraits.hh:92
Definition: typetraits.hh:81
char dummy[N+1]
Definition: typetraits.hh:81
Definition: typetraits.hh:82
char dummy[2]
Definition: typetraits.hh:82
Definition: typetraits.hh:83
char dummy[1]
Definition: typetraits.hh:83
Definition: typetraits.hh:97
void type
Definition: typetraits.hh:98
Marker tag declaring a meta function.
Definition: typetraits.hh:121
Helper meta function to delay evaluation of F.
Definition: typetraits.hh:126
F::type type
Definition: typetraits.hh:127
Identity function.
Definition: typetraits.hh:133
F type
Definition: typetraits.hh:134
Meta function that evaluates its argument iff it inherits from meta_function.
Definition: typetraits.hh:140
std::conditional< std::is_base_of< meta_function, F >::value, lazy_evaluate< F >, lazy_identity< F > >::type::type type
Definition: typetraits.hh:145
Check if type represents a tree path.
Definition: typetraits.hh:182