aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/concepts-class2.C
blob: 0ed9eb0a386d0a39fd2015efae0da294d04656f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
// PR c++/96229
// { dg-do compile { target c++20 } }

template <class T> concept Int = requires { T{0}; };
template <template <Int> class P> struct X        { };
template <Int>                    struct Y : X<Y> { };
                                  struct Z        { };
                                  struct W        { int i; };

Y<Z> z; // { dg-error "constraint" }
Y<W> w;