Strange behavior

Jimen Ching jching@flex.com
Sat Feb 28 18:19:00 GMT 1998


On 28 Feb 1998, Alexandre Oliva wrote:
> Jimen Ching writes:
> > 	I get the following behavior.  Is there something wrong with the
> > code or with g++?
> With the code.  You must use the `typename' keyword before any
> template argument-dependent nested type.
> 
> >                 list_type::const_iterator idx = _my_list.begin();

You cut off the sentence where I said g++ did not warn about a typename.
I've already tried typename, and it didn't work either.  But my point was
that g++ didn't warn about typename and gave an error instead.  A parse
error at that.  You would think that a missing typename would be a
semantic error, not a parse error.

--jc
--
Jimen Ching (WH6BRR)      jching@flex.com     wh6brr@uhm.ampr.org




More information about the Gcc-bugs mailing list