1 // Test that the synthesized C copy constructor calls the A template 2 // constructor and has the appropriate exception specification. 3 // { dg-do run { target c++11 } } 4 5 int r = 1; 6 7 struct A 8 { AA9 A() {} throwA10 A(const A&) throw () { } 11 template <class T> AA12 A(T& t) { r = 0; } 13 }; 14 15 struct B 16 { BB17 B() {} throwB18 B(B&) throw () { } 19 }; 20 21 struct C: A, B { }; 22 23 #define SA(E) static_assert(E, #E) 24 25 C c; 26 SA (!noexcept(C(c))); 27 main()28int main() 29 { 30 (C(c)); 31 return r; 32 } 33