c++: P0847R7 (deducing this) - xobj lambdas. [PR102609]
[official-gcc.git] / gcc / testsuite / g++.dg / cpp2a / concepts-partial-spec13.C
blobb5ec2c92585b2595dbec39a7c86bbc07a82b4219
1 // PR c++/99501
2 // { dg-do compile { target c++20 } }
4 template<auto> struct X;
6 template<auto V> requires requires{V.a;} struct X<V>;
7 template<auto V> requires requires{V.b;} struct X<V>;
9 template<auto V> requires requires{V.a;} struct X<V> { static const bool v = false; };
10 template<auto V> requires requires{V.b;} struct X<V> { static const bool v = true; };
12 struct A { int a; };
13 static_assert(!X<A{}>::v);
15 struct B { int b; };
16 static_assert(X<B{}>::v);