c++, coroutines: Simplify separation of the user function body and ramp.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp1y / constexpr-local4.C
blob647b5dcd7cd5a8beaec5077ad2eba900238f8d8a
1 // { dg-do compile { target c++14 } }
3 struct A
5   int i;
6   constexpr A(int i): i(i) {};
7 };
9 const A a = 42;
11 constexpr int f()
13   const int j = a.i;            // { dg-error "'a'" }
14   return j;
17 static_assert (f() == 42,"");   // { dg-error "" }