Re: Hidden Overloaded C++ Virtual Function
Re: Hidden Overloaded C++ Virtual Function
- Subject: Re: Hidden Overloaded C++ Virtual Function
- From: Marshall Clow <email@hidden>
- Date: Fri, 30 Dec 2005 11:26:13 -0800
At 12:12 PM -0700 12/30/05, Nick Nallick wrote:
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.
Nope - gcc is correct.
I believe that hiding is done by function name, not by signature.
if you override any of the "foo"s, then you hide all of them.
A simpler example is here (but no explanation as to _why_ )
<http://burks.bton.ac.uk/burks/language/cpp/cppfaq/strangei.htm#[23.3]>
Here's an attempted explanation (with complicated example)
<http://groups.google.com/group/comp.sys.mac.programmer.codewarrior/browse_thread/thread/fdf6a1eeff9810c7/fa27a49c82333654#fa27a49c82333654?sa=X&oi=groupsr&start=1&num=3>
--
-- Marshall
Marshall Clow Idio Software <mailto:email@hidden>
It is by caffeine alone I set my mind in motion.
It is by the beans of Java that thoughts acquire speed,
the hands acquire shaking, the shaking becomes a warning.
It is by caffeine alone I set my mind in motion.
_______________________________________________
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