33 { return __has_virtual_destructor(T); }
41 { return !!__has_virtual_destructor(T); }
48 static const bool trait = __has_virtual_destructor(T);
52 const bool My2<T>::trait;
54 template<typename T, bool b = __has_virtual_destructor(T)>
56 { static const bool trait = b; };
58 template<typename T, bool b>
59 const bool My3_help<T, b>::trait;
67 { return My3_help<T>::trait; }
70 #define PTEST(T) (__has_virtual_destructor(T) && f<T>() \
71 && My<T>().f() && My2<T>::trait && My3<T>().f())
73 #define NTEST(T) (!__has_virtual_destructor(T) && !f<T>() \
74 && !My<T>().f() && !My2<T>::trait && !My3<T>().f())
79 assert (NTEST (void));
80 assert (PTEST (std::exception));