This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
(gcc 2.95.2 NT4 SP6) using declaration to avoid hiding base class methods
- To: egcs-bugs at egcs dot cygnus dot com
- Subject: (gcc 2.95.2 NT4 SP6) using declaration to avoid hiding base class methods
- From: Thomas Maeder <maeder at glue dot ch>
- Date: Tue, 14 Mar 2000 22:30:53 +0100
Hi
I am using gcc 2.95.2 on Windows NT4 SP6.
When I compile the following program:
struct A
{
void f();
void f(int);
};
struct B : A
{
using A::f;
void f(int);
};
int main()
{
B b;
b.f();
}
, I get:
using.cpp:11: cannot adjust access to `void A::f(int)' in `struct B'
using.cpp:10: because of local method `void B::f(int)' with same name
using.cpp: In function `int main()':
using.cpp:16: no matching function for call to `B::f ()'
using.cpp:10: candidates are: void B::f(int)
(where line #11 is the using declaration and line #16 the call b.f()).