30 { return __has_trivial_destructor(T); }
38 { return !!__has_trivial_destructor(T); }
45 static const bool trait = __has_trivial_destructor(T);
49 const bool My2<T>::trait;
51 template<typename T, bool b = __has_trivial_destructor(T)>
53 { static const bool trait = b; };
55 template<typename T, bool b>
56 const bool My3_help<T, b>::trait;
64 { return My3_help<T>::trait; }
67 #define PTEST(T) (__has_trivial_destructor(T) && f<T>() \
68 && My<T>().f() && My2<T>::trait && My3<T>().f())
70 #define NTEST(T) (!__has_trivial_destructor(T) && !f<T>() \
71 && !My<T>().f() && !My2<T>::trait && !My3<T>().f())
76 assert (NTEST (int (int)));
77 assert (NTEST (void));