* decl.c (make_typename_type): s/parameters/arguments/.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / defaulted23.C
blobdfbdd2f2ed1bca53af5e1fabb737fa3f0a5a51f0
1 // Test for checking of exception specifications on defaulted fns
2 // { dg-do compile { target c++11 } }
4 struct A
6   A() noexcept = default;
7 };
9 A a;
11 struct B
13   B() throw (int) = default; // { dg-message "exception-specification" "" { target { ! c++17 } } }
14 };                              // { dg-error "dynamic exception specification" "" { target c++17 } .-1 }
15                                 // { dg-warning "deprecated" "" { target { ! c++17 } } .-2 }
16 B b;                            // { dg-error "deleted" "" { target { ! c++17 } } }
18 struct C
20   C() throw (int) { }           // { dg-error "dynamic exception specification" "" { target c++17 } }
21 };                              // { dg-warning "deprecated" "" { target { ! c++17 } } .-1 }
23 C c;
25 struct D: C
27   D() throw (int) = default;    // { dg-error "dynamic exception specification" "" { target c++17 } }
28 };                              // { dg-warning "deprecated" "" { target { ! c++17 } } .-1 }
30 D d;
32 struct E
34   E() = default;
37 E e;