• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Hidden Overloaded C++ Virtual Function
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Hidden Overloaded C++ Virtual Function (From: Nick Nallick <email@hidden>)

  • Prev by Date: Hidden Overloaded C++ Virtual Function
  • Next by Date: Re: Hidden Overloaded C++ Virtual Function
  • Previous by thread: Hidden Overloaded C++ Virtual Function
  • Next by thread: Re: Hidden Overloaded C++ Virtual Function
  • Index(es):
    • Date
    • Thread