1 // Test for checking of exception specifications on defaulted fns
2 // { dg-do compile { target c++11 } }
6 A() noexcept = default;
13 B() throw (int) = default;
14 }; // { dg-error "dynamic exception specification" "" { target c++17 } .-1 }
15 // { dg-warning "deprecated" "" { target { ! c++17 } } .-2 }
20 C() throw (int) { } // { dg-error "dynamic exception specification" "" { target c++17 } }
21 }; // { dg-warning "deprecated" "" { target { ! c++17 } } .-1 }
27 D() throw (int) = default; // { dg-error "dynamic exception specification" "" { target c++17 } }
28 }; // { dg-warning "deprecated" "" { target { ! c++17 } } .-1 }