Debian Codegraph @

gcc/testsuite/g++.dg/cpp2a/concepts-var-templ1a.C

raw
1 // PR c++/98486
2 // { dg-do compile { target c++20 } }
3
4 template<class T, class U> concept C = __is_same(T, U);
5
6 struct A {
7 template<C<int>> static int v;
8 };
9
10 template<> int A::v<int>;
11 template<> int A::v<char>; // { dg-error "match" }
12
13 int x = A::v<int>;
14 int y = A::v<char>; // { dg-error "invalid" }