6#ifndef DUNE_TYPETREE_TYPETRAITS_HH
7#define DUNE_TYPETREE_TYPETRAITS_HH
10#include <dune/common/typetraits.hh>
20 template<
typename... T>
23 template<
typename T0,
typename... T>
43 constexpr static bool value =
sizeof(test<T>(0)) ==
sizeof(
yes);
46 template<
typename T,
typename V>
61 constexpr static bool value =
sizeof(test<T>(0)) ==
sizeof(
yes);
76 constexpr static bool value =
sizeof(test<T>(0)) ==
sizeof(
yes);
79 template<
typename T,
typename V>
94 constexpr static bool value =
sizeof(test<T>(0)) ==
sizeof(
yes);
143 typedef typename std::conditional<
144 std::is_base_of<meta_function,F>::value,
158 return std::false_type();
166 return std::true_type();
183 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:70
typename std::decay_t< T >::ImplementationTag ImplementationTag
Returns the implementation tag of the given Node.
Definition nodeinterface.hh:74
Definition accumulate_static.hh:16
constexpr auto isTreePath(const T &) -> IsTreePath< T >
Check if given object represents a tree path.
Definition typetraits.hh:193
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:155
A hybrid version of TreePath that supports both compile time and run time indices.
Definition treepath.hh:158
Definition typetraits.hh:21
T0 type
Definition typetraits.hh:26
Definition typetraits.hh:33
static constexpr bool value
True if class T defines a NodeTag.
Definition typetraits.hh:43
static yes test(NodeTag< X > *)
Definition typetraits.hh:34
char dummy[1]
Definition typetraits.hh:34
Definition typetraits.hh:35
char dummy[2]
Definition typetraits.hh:35
Definition typetraits.hh:48
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:61
Definition typetraits.hh:50
char dummy[N+1]
Definition typetraits.hh:50
Definition typetraits.hh:51
char dummy[2]
Definition typetraits.hh:51
Definition typetraits.hh:52
char dummy[1]
Definition typetraits.hh:52
Definition typetraits.hh:66
static yes test(ImplementationTag< X > *)
static constexpr bool value
True if class T defines an ImplementationTag.
Definition typetraits.hh:76
Definition typetraits.hh:67
char dummy[1]
Definition typetraits.hh:67
Definition typetraits.hh:68
char dummy[2]
Definition typetraits.hh:68
Definition typetraits.hh:81
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:94
Definition typetraits.hh:83
char dummy[N+1]
Definition typetraits.hh:83
Definition typetraits.hh:84
char dummy[2]
Definition typetraits.hh:84
Definition typetraits.hh:85
char dummy[1]
Definition typetraits.hh:85
Definition typetraits.hh:99
void type
Definition typetraits.hh:100
Marker tag declaring a meta function.
Definition typetraits.hh:123
Helper meta function to delay evaluation of F.
Definition typetraits.hh:128
F::type type
Definition typetraits.hh:129
Identity function.
Definition typetraits.hh:135
F type
Definition typetraits.hh:136
Meta function that evaluates its argument iff it inherits from meta_function.
Definition typetraits.hh:142
std::conditional< std::is_base_of< meta_function, F >::value, lazy_evaluate< F >, lazy_identity< F > >::type::type type
Definition typetraits.hh:147
Check if type represents a tree path.
Definition typetraits.hh:184