mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-23 15:09:44 +08:00
parent
598f25beb6
commit
f6a91eb09f
23
gcc/testsuite/g++.dg/lookup/using.C
Normal file
23
gcc/testsuite/g++.dg/lookup/using.C
Normal file
@ -0,0 +1,23 @@
|
||||
// { dg-do compile }
|
||||
|
||||
struct X { };
|
||||
struct Y { };
|
||||
struct Z { };
|
||||
|
||||
struct Base {
|
||||
X f() { return X(); }
|
||||
Y f() const { return Y(); }
|
||||
};
|
||||
|
||||
struct Derived : Base {
|
||||
using Base::f;
|
||||
Z f(int) { return Z(); }
|
||||
};
|
||||
|
||||
int main()
|
||||
{
|
||||
Derived d;
|
||||
X x = d.f();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user