Re: C++ : "is not derived from type"..
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