Hidden Overloaded C++ Virtual Function
Hidden Overloaded C++ Virtual Function
- Subject: Hidden Overloaded C++ Virtual Function
- From: Nick Nallick <email@hidden>
- Date: Fri, 30 Dec 2005 12:12:49 -0700
There's probably something subtle here that I don't understand, but
can somebody tell me why gcc4 is telling me that A::foo(a) is hidden
by B::foo(b) when I comment out B::foo(a) below? This seems like an
overenthusiastic warning to me.
Thanks,
Nick
warning: 'virtual void A::foo(a)' was hidden
warning: by 'virtual void B::foo(b)'
struct a
{
int i;
};
struct b
{
double x;
};
class A
{
virtual ~A() {};
virtual void foo(a) {};
virtual void foo(b) {};
};
class B : public A
{
// virtual void foo(a) {};
virtual void foo(b) {};
};
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden