Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/noexcept45.C

raw
1 // PR c++/86476 - noexcept-specifier is a complete-class context
2 // { dg-do compile { target c++11 } }
3
4 struct A
5 {
6 virtual void f();
7 virtual void g() noexcept;
8 virtual void h() noexcept(false);
9 };
10
11 struct B : A
12 {
13 void f() noexcept(true);
14 void g() noexcept(true);
15 void h() noexcept(true);
16 };
17
18 struct D : A
19 {
20 void f() noexcept(false);
21 void g() noexcept(false); // { dg-error "looser exception specification" }
22 void h() noexcept(false);
23 };