compile template question

Fri Dec 2 15:16:00 GMT 2016

Oops, sorry for that. Please delete 'followed by a less-than operator' and
the rest still holds.

Best regards,

发件人:Jonathan Wakely <>
发送日期:2016-12-02 23:11
主题:Re: Re: compile template question

On 2 December 2016 at 14:25, lhmouse wrote:
> It is the evilness of C.
> If the code without `typename` were valid it would be ambiguous, because
> `std::map<K,V>::iterator` could well be the name of some static member variable
> followed by a less-than operator and what you think is a declaration
> looks like an expression statement in spite that in no case is it valid.

No. That's a different problem (the case where the "template" keyword
is needed).

More information about the Gcc-help mailing list