aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/concepts-using5.C
blob: d42b8a0167b9ade0eadaf05a9f4ba6e08d86c673 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// 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> = delete; // #1
};

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

int main() {
  B b;
  b.f(42); // OK, #2 corresponds to and therefore hides #1
}