23 virtual int f() { return 1; }
45 { return __has_trivial_copy(T); }
53 { return !!__has_trivial_copy(T); }
60 static const bool trait = __has_trivial_copy(T);
64 const bool My2<T>::trait;
66 template<typename T, bool b = __has_trivial_copy(T)>
68 { static const bool trait = b; };
70 template<typename T, bool b>
71 const bool My3_help<T, b>::trait;
79 { return My3_help<T>::trait; }
82 #define PTEST(T) (__has_trivial_copy(T) && f<T>() \
83 && My<T>().f() && My2<T>::trait && My3<T>().f())
85 #define NTEST(T) (!__has_trivial_copy(T) && !f<T>() \
86 && !My<T>().f() && !My2<T>::trait && !My3<T>().f())
91 assert (NTEST (int (int)));
92 assert (NTEST (void));