4 #ifndef DUNE_TYPETREE_TYPETRAITS_HH
5 #define DUNE_TYPETREE_TYPETRAITS_HH
8 #include <dune/common/typetraits.hh>
16 using std::is_base_of;
18 template<
typename... T>
21 template<
typename T0,
typename... T>
36 static yes test(
typename X::NodeTag *);
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]; };
56 test(
typename X::NodeTag * a);
69 struct yes {
char dummy[1]; };
70 struct no {
char dummy[2]; };
73 static yes test(
typename X::ImplementationTag *);
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]; };
93 test(
typename X::ImplementationTag * a);
113 #if HAVE_STD_DECLTYPE
114 #define DUNE_DECLTYPE decltype
115 #elif HAVE_GCC___TYPEOF__
116 #define DUNE_DECLTYPE __typeof__
118 #error The TypeTree library requires support for
119 #error C++11 decltype or a compatible fallback in your compiler.
120 #error Neither of those was found, aborting!!!!
165 typedef typename conditional<
166 is_base_of<meta_function,F>::value,
175 #endif // DUNE_TYPETREE_TYPETRAITS_HH
Definition: typetraits.hh:87
Definition: typetraits.hh:30
Definition: typetraits.hh:67
True if class T defines a NodeTag.
Definition: typetraits.hh:42
Definition: typetraits.hh:69
F type
Definition: typetraits.hh:158
Definition: typetraits.hh:33
char dummy[2]
Definition: typetraits.hh:33
Definition: typetraits.hh:70
Definition: accumulate_static.hh:12
Helper meta function to delay evaluation of F.
Definition: typetraits.hh:149
Definition: typetraits.hh:50
Definition: typetraits.hh:84
T * declptr()
Helper function for generating a pointer to a value of type T in an unevaluated operand setting...
T0 type
Definition: typetraits.hh:24
Definition: typetraits.hh:89
Definition: typetraits.hh:52
Meta function that evaluates its argument iff it inherits from meta_function.
Definition: typetraits.hh:163
static yes test(typename X::NodeTag *)
Definition: typetraits.hh:51
Definition: typetraits.hh:88
Marker tag declaring a meta function.
Definition: typetraits.hh:145
Definition: typetraits.hh:47
Definition: typetraits.hh:19
Definition: typetraits.hh:32
void type
Definition: typetraits.hh:106
conditional< is_base_of< meta_function, F >::value, lazy_evaluate< F >, lazy_identity< F > >::type::type type
Definition: typetraits.hh:169
Identity function.
Definition: typetraits.hh:156
char dummy[1]
Definition: typetraits.hh:32
F::type type
Definition: typetraits.hh:151
Definition: typetraits.hh:104