18 B& operator=(const B&) { return *this;}
23 virtual int f() { return 1; }
45 { return __has_trivial_assign(T); }
53 { return !!__has_trivial_assign(T); }
60 static const bool trait = __has_trivial_assign(T);
64 const bool My2<T>::trait;
66 template<typename T, bool b = __has_trivial_assign(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_assign(T) && f<T>() \
83 && My<T>().f() && My2<T>::trait && My3<T>().f())
85 #define NTEST(T) (!__has_trivial_assign(T) && !f<T>() \
86 && !My<T>().f() && !My2<T>::trait && !My3<T>().f())
91 assert (NTEST (int (int)));
92 assert (NTEST (void));
102 assert (NTEST (const A));