40 { return __has_trivial_constructor(T); }
48 { return !!__has_trivial_constructor(T); }
55 static const bool trait = __has_trivial_constructor(T);
59 const bool My2<T>::trait;
61 template<typename T, bool b = __has_trivial_constructor(T)>
63 { static const bool trait = b; };
65 template<typename T, bool b>
66 const bool My3_help<T, b>::trait;
74 { return My3_help<T>::trait; }
77 #define PTEST(T) (__has_trivial_constructor(T) && f<T>() \
78 && My<T>().f() && My2<T>::trait && My3<T>().f())
80 #define NTEST(T) (!__has_trivial_constructor(T) && !f<T>() \
81 && !My<T>().f() && !My2<T>::trait && !My3<T>().f())
86 assert (NTEST (int (int)));
87 assert (NTEST (void));