Debian Codegraph @

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

raw
1 // { dg-do compile { target c++11 } }
2 // { dg-additional-options "-fno-exceptions" }
3
4 // PR68475 we used to not check eh spec matching with -fno-exceptions,
5 // but this could lead to ICEs.
6
7 template <typename> struct traits;
8
9 template <typename T> struct X
10 {
11 void Foo () noexcept (traits <T>::foo ()); // { dg-message "previous declaration" }
12 };
13
14 template <typename T>
15 void
16 X<T>::Foo () noexcept (traits <T>::bar ()) // { dg-error "different exception specifier" }
17 {
18 }
19