Debian Codegraph @

gcc/testsuite/g++.dg/cpp2a/concepts-class2.C

raw
1 // PR c++/96229
2 // { dg-do compile { target c++20 } }
3
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; };
9
10 Y<Z> z; // { dg-error "constraint" }
11 Y<W> w;