c++: robustify testcase [PR109752]
[official-gcc.git] / gcc / testsuite / g++.dg / template / evaluated1a.C
blob7828687100486a67c030f5470cdba405aa440e68
1 // PR c++/101906
2 // Like unevaluated1.C, but where the unevaluated context is a
3 // constraint instead of sizeof.
4 // { dg-do compile { target c++20 } }
6 template<int> using voidify = void;
8 template<class T>
9 concept constant_value_initializable
10   = requires { typename voidify<(T(), 0)>; };
12 struct A {
13   int m = -1;
16 static_assert(constant_value_initializable<A>);