aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/concepts-using6.C
blob: a40519a30daefc9d9bbf77aa524a0056120c084f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// PR c++/121351
// { dg-do compile { target c++20 } }

template<class T> concept C = true;

template<class T>
struct A {
  template<class U> void f(U) requires C<T>; // #1
};

template<class T>
struct B : A<T*> {
  using A<T*>::f;
  template<class U> void f(U) requires C<T>; // #2
};

int main() {
  B<int> b;
  b.f(42); // { dg-error "ambiguous" } #1 and #2 don't correspond
}