Debian Codegraph @

gcc/testsuite/g++.dg/cpp1z/noexcept-type25.C

raw
1 // PR c++/80951
2 // { dg-do compile { target c++17 } }
3
4 void f() noexcept;
5 void g();
6
7 template<bool E>
8 constexpr bool h(void (*)() noexcept(E)) {
9 return E;
10 }
11
12 static_assert(h(f));
13 static_assert(!h(g));