• 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: C++ : "is not derived from type"..
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C++ : "is not derived from type"..


  • Subject: Re: C++ : "is not derived from type"..
  • From: Markian Hlynka <email@hidden>
  • Date: Wed, 21 Oct 2009 08:58:06 -0600

The problem is that c++ has no way of distinguishing a class member from a type. That is, it has no way of knowing what :: is delineating a-priori, which is a requirement for syntax checking. The parser needs typename to know which path to follow. At least, I think I've explained it properly. Jossuttis has a good, concise explanation.

Markian

Sent from my iPhone

On 2009-10-21, at 7:16, Dan Caugherty <email@hidden> wrote:

Thanks Steve!

But oh that's just not annoying, it's weird. It seems to me that  the
compiler is recognizing the linkage<> type in the global namespace (as
it was defined just a few short lines earlier), but it still needs the
containing class to hoodwink it with the typename keyword.

I will most definitely want to read the rationale for this. Anyone
else know where I can find a suitable explanation?

Thx again,
-- Dan C.

On Tue, Oct 20, 2009 at 11:23 PM, Steve Checkoway <email@hidden> wrote:

All you need to do is change

typedef linkage<IsCPP>::function_type function_type;
to
typedef typename linkage<IsCPP>::function_type function_type;
_______________________________________________
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
_______________________________________________
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: 
 >C++ : "is not derived from type".. (From: Dan Caugherty <email@hidden>)
 >Re: C++ : "is not derived from type".. (From: Steve Checkoway <email@hidden>)
 >Re: C++ : "is not derived from type".. (From: Dan Caugherty <email@hidden>)

  • Prev by Date: Re: IB 3.2.x bringing back IB (only) edit of outlets and actions?
  • Next by Date: Re: C++ : "is not derived from type"..
  • Previous by thread: Re: C++ : "is not derived from type"..
  • Next by thread: Re: C++ : "is not derived from type"..
  • Index(es):
    • Date
    • Thread