12 #include "libmesh/libmesh_common.h" 14 #define BuiltInSpecializations(Type, BuiltinType) \ 16 class HasMemberType_##Type<BuiltinType> \ 19 static constexpr bool value = false; \ 23 #define GENERATE_HAS_MEMBER_TYPE0(Type) \ 25 class HasMemberType_##Type \ 28 using Yes = char[2]; \ 37 struct Derived : T, Fallback \ 42 static No & test(typename U::Type *); \ 43 template <typename U> \ 44 static Yes & test(U *); \ 47 static constexpr bool value = sizeof(test<Derived>(nullptr)) == sizeof(Yes); \ 49 BuiltInSpecializations(Type, char); \ 50 BuiltInSpecializations(Type, short); \ 51 BuiltInSpecializations(Type, int); \ 52 BuiltInSpecializations(Type, long); \ 53 BuiltInSpecializations(Type, unsigned char); \ 54 BuiltInSpecializations(Type, unsigned short); \ 55 BuiltInSpecializations(Type, unsigned int); \ 56 BuiltInSpecializations(Type, unsigned long); \ 57 BuiltInSpecializations(Type, float); \ 58 BuiltInSpecializations(Type, double); \ 59 BuiltInSpecializations(Type, long double) 61 #ifdef LIBMESH_DEFAULT_QUADRUPLE_PRECISION 62 #define GENERATE_HAS_MEMBER_TYPE(Type) \ 63 GENERATE_HAS_MEMBER_TYPE0(Type); \ 64 BuiltInSpecializations(Type, Real) 66 #define GENERATE_HAS_MEMBER_TYPE(Type) GENERATE_HAS_MEMBER_TYPE0(Type) GENERATE_HAS_MEMBER_TYPE(OutputShape)