aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/concepts-var-templ1a.C
blob: b12d37d8b7e3b6bfb39e71e1dda3bbd2f4c0534b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// PR c++/98486
// { dg-do compile { target c++20 } }

template<class T, class U> concept C = __is_same(T, U);

struct A {
  template<C<int>> static int v;
};

template<> int A::v<int>;
template<> int A::v<char>; // { dg-error "match" }

int x = A::v<int>;
int y = A::v<char>; // { dg-error "invalid" }