Re: Hidden Overloaded C++ Virtual Function
Re: Hidden Overloaded C++ Virtual Function
- Subject: Re: Hidden Overloaded C++ Virtual Function
- From: David Fang <email@hidden>
- Date: Fri, 30 Dec 2005 14:59:57 -0500 (EST)
Hi,
You can also 'import' the overloads of A::foo with an explicit
using-declaration:
class B : public A {
...
using A::foo;
...
};
After the using declaration, you can still declare overrides and
overloads in B.
> warning: 'virtual void A::foo(a)' was hidden
> warning: by 'virtual void B::foo(b)'
>
> struct a;
> struct b;
>
> class A
> {
> virtual ~A() {};
> virtual void foo(a) {};
> virtual void foo(b) {};
> };
>
> class B : public A
> {
> // virtual void foo(a) {};
> virtual void foo(b) {};
> };
David Fang
_______________________________________________
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