compile template question

Jonathan Wakely
Fri Dec 2 15:11:00 GMT 2016

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