Debian Codegraph @

gcc/testsuite/g++.dg/cpp2a/concepts-using5.C

raw
1 // PR c++/121351
2 // { dg-do compile { target c++20 } }
3
4 template<class T> concept C = true;
5
6 template<class T>
7 struct A {
8 template<class U> void f(U) requires C<T> = delete; // #1
9 };
10
11 struct B : A<int> {
12 using A::f;
13 template<class U> void f(U) requires C<int>; // #2
14 };
15
16 int main() {
17 B b;
18 b.f(42); // OK, #2 corresponds to and therefore hides #1
19 }