Debian Codegraph @

gcc/testsuite/g++.dg/template/evaluated1a.C

raw
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 } }
5
6 template<int> using voidify = void;
7
8 template<class T>
9 concept constant_value_initializable
10 = requires { typename voidify<(T(), 0)>; };
11
12 struct A {
13 int m = -1;
14 };
15
16 static_assert(constant_value_initializable<A>);