Debian Codegraph @

gcc/testsuite/g++.dg/eh/spec5.C

raw
1 // Test for extension to allow incomplete types in an
2 // exception-specification for a declaration.
3
4 // { dg-do run }
5 // { dg-options "-fpermissive -w" }
6
7 struct A;
8
9 struct B
10 {
11 void f ()
12 #if __cplusplus <= 201402L
13 throw (A)
14 #endif
15 ;
16 };
17
18 struct A {};
19
20 void B::f ()
21 #if __cplusplus <= 201402L
22 throw (A)
23 #endif
24 {}
25
26 int main ()
27 {
28 B b;
29 b.f();
30 }