PR c++/77369 - wrong noexcept handling in C++14 and below
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / noexcept31.C
blobc4c0e7dd466f9c64c80c6d6a6d8e18ff1590954a
1 // PR c++/77369
2 // { dg-do compile { target c++11 } }
4 template<typename F> int caller(F f) noexcept(noexcept(f())) { f(); return 0; }
6 void func1() noexcept { }
8 void func2() { throw 1; }
10 int instantiate_caller_with_func1 = caller(func1);
12 static_assert( !noexcept(caller(func2)), "" );