Debian Codegraph @

gcc/testsuite/g++.dg/lookup/using.C

raw
1 // { dg-do compile }
2
3 struct X { };
4 struct Y { };
5 struct Z { };
6
7 struct Base {
8 X f() { return X(); }
9 Y f() const { return Y(); }
10 };
11
12 struct Derived : Base {
13 using Base::f;
14 Z f(int) { return Z(); }
15 };
16
17 int main()
18 {
19 Derived d;
20 X x = d.f(); // { dg-bogus "Y" }
21 }
22
23