• 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
Hidden Overloaded C++ Virtual Function
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Hidden Overloaded C++ Virtual Function
      • From: Adin Hunter Baber <email@hidden>
    • Re: Hidden Overloaded C++ Virtual Function
      • From: David Fang <email@hidden>
    • Re: Hidden Overloaded C++ Virtual Function
      • From: Marshall Clow <email@hidden>
  • Prev by Date: Re: Java and gutter error flags
  • Next by Date: Re: Hidden Overloaded C++ Virtual Function
  • Previous by thread: GCC_VERSION_* not being respected
  • Next by thread: Re: Hidden Overloaded C++ Virtual Function
  • Index(es):
    • Date
    • Thread