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>
32 struct yes {
char dummy[1]; };
33 struct no {
char dummy[2]; };
42 value =
sizeof(test<T>(0)) ==
sizeof(
yes)
46 template<
typename T,
typename V>
50 struct maybe {
char dummy[N+1]; };
51 struct yes {
char dummy[2]; };
52 struct no {
char dummy[1]; };
62 value =
sizeof(test<T>(0)) ==
sizeof(
yes)
69 struct yes {
char dummy[1]; };
70 struct no {
char dummy[2]; };
79 value =
sizeof(test<T>(0)) ==
sizeof(
yes)
83 template<
typename T,
typename V>
87 struct maybe {
char dummy[N+1]; };
88 struct yes {
char dummy[2]; };
89 struct no {
char dummy[1]; };
99 value =
sizeof(test<T>(0)) ==
sizeof(
yes)
149 typedef typename std::conditional<
150 std::is_base_of<meta_function,F>::value,
164 return std::false_type();
171 return std::true_type();
175 template<std::size_t... i>
179 return std::true_type();
187 return std::true_type();
204 public decltype(impl::isTreePath((typename std::decay<T>::type*)(nullptr)))
224 #endif // DUNE_TYPETREE_TYPETRAITS_HH Definition: typetraits.hh:84
Check if type represents a tree path.
Definition: typetraits.hh:203
Definition: typetraits.hh:67
Helper meta function to delay evaluation of F.
Definition: typetraits.hh:133
Definition: typetraits.hh:89
void type
Definition: typetraits.hh:106
A TreePath that stores the path of a node as runtime information.
Definition: treepath.hh:157
Meta function that evaluates its argument iff it inherits from meta_function.
Definition: typetraits.hh:147
typename std::decay_t< T >::ImplementationTag ImplementationTag
Returns the implementation tag of the given Node.
Definition: nodeinterface.hh:66
Definition: typetraits.hh:50
Definition: typetraits.hh:32
Definition: typetraits.hh:19
Definition: accumulate_static.hh:13
Definition: typetraits.hh:70
Definition: typetraits.hh:52
Definition: typetraits.hh:47
constexpr auto isTreePath(const T &) -> IsTreePath< T >
Check if given object represents a tree path.
Definition: typetraits.hh:214
Definition: typetraits.hh:87
Definition: typetraits.hh:69
T0 type
Definition: typetraits.hh:24
T * declptr()
Helper function for generating a pointer to a value of type T in an unevaluated operand setting...
F::type type
Definition: typetraits.hh:135
Marker tag declaring a meta function.
Definition: typetraits.hh:129
std::conditional< std::is_base_of< meta_function, F >::value, lazy_evaluate< F >, lazy_identity< F > >::type::type type
Definition: typetraits.hh:153
Definition: typetraits.hh:88
Identity function.
Definition: typetraits.hh:140
Definition: typetraits.hh:30
F type
Definition: typetraits.hh:142
A hybrid version of TreePath that supports both compile time and run time indices.
Definition: treepath.hh:322
Definition: typetraits.hh:51
Definition: typetraits.hh:104
Definition: treepath.hh:30
Definition: typetraits.hh:33
typename std::decay_t< Node >::NodeTag NodeTag
Returns the node tag of the given Node.
Definition: nodeinterface.hh:62