30 E1() throw(int) { throw int(); }
35 F(const F&) throw() { }
40 G(const G&) throw(int) { throw int(); }
46 { return __has_nothrow_constructor(T); }
54 { return !!__has_nothrow_constructor(T); }
61 static const bool trait = __has_nothrow_constructor(T);
65 const bool My2<T>::trait;
68 template<typename T, bool b = __has_nothrow_constructor(T)>
70 { static const bool trait = b; };
72 template<typename T, bool b>
73 const bool My3_help<T, b>::trait;
81 { return My3_help<T>::trait; }
84 #define PTEST(T) (__has_nothrow_constructor(T) && f<T>() \
85 && My<T>().f() && My2<T>::trait && My3<T>().f())
87 #define NTEST(T) (!__has_nothrow_constructor(T) && !f<T>() \
88 && !My<T>().f() && !My2<T>::trait && !My3<T>().f())
93 assert (NTEST (int (int)));
94 assert (NTEST (void));