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