Debian Codegraph @

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

raw
1 // PR c++/113088
2
3 #if __cplusplus >= 201103L
4 #define THROWS noexcept(false)
5 #else
6 #define THROWS
7 #endif
8
9 struct X {
10 ~X() {}
11 };
12
13 struct Y {
14 ~Y() THROWS {}
15 };
16
17 X foo() {
18 try {
19 return X();
20 } catch (...) {
21 Y();
22 return X();
23 }
24
25 try { } catch (...) { }
26 }