1 /* [depr.impldec] The implicit definition of a copy constructor as defaulted is
2 deprecated if the class has a user-declared copy assignment operator or a
3 user-declared destructor. The implicit definition of a copy assignment
4 operator as defaulted is deprecated if the class has a user-declared copy
5 constructor or a user-declared destructor (15.4, 15.8). In a future revision
6 of this International Standard, these implicit definitions could become
9 // { dg-additional-options -Wdeprecated-copy-dtor }
26 throw A(); // Don't warn about elided copy
27 A a2 = A(); // Here either.
28 A a3 (a); // { dg-warning "deprecated" "" { target c++11 } }