c++: P0847R7 (deducing this) - xobj lambdas. [PR102609]
[official-gcc.git] / gcc / testsuite / g++.dg / cpp2a / concepts-class2.C
blob0ed9eb0a386d0a39fd2015efae0da294d04656f3
1 // PR c++/96229
2 // { dg-do compile { target c++20 } }
4 template <class T> concept Int = requires { T{0}; };
5 template <template <Int> class P> struct X        { };
6 template <Int>                    struct Y : X<Y> { };
7                                   struct Z        { };
8                                   struct W        { int i; };
10 Y<Z> z; // { dg-error "constraint" }
11 Y<W> w;