c++, coroutines: Simplify separation of the user function body and ramp.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp1y / noexcept1.C
blobcaa4a056a2ed104818fbcc32557bf664646d76d3
1 // PR c++/89873
2 // { dg-do compile { target c++14 } }
4 template <int> bool b;
6 template <typename> 
7 struct C {
8   template <typename> friend int foo() noexcept(b<1>); // { dg-error "not usable in a constant expression" }
9 };
11 template <typename> int foo() noexcept(b<1>); // { dg-error "not usable in a constant expression" }
13 auto a = C<int>();