This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: gcc-2.95.1 pedantic bug? some map template does not work within template function
- To: AJRobb at bigfoot dot com
- Subject: Re: gcc-2.95.1 pedantic bug? some map template does not work within template function
- From: Alexandre Oliva <oliva at dcc dot unicamp dot br>
- Date: 31 Aug 1999 16:51:54 -0300
- Cc: <bug-gcc at gnu dot org>
- References: <B766A4A0DB0BD2119BF40000F824778E24BA2D@mailhost.x-tension.co.uk>
On Aug 31, 1999, AJRobb@bigfoot.com wrote:
> // -pedantic complains if the first form of typedef is used above
> typedef DescMap::const_iterator DescIterator;
And it's correct, because the C++ Standard requires template-dependent
qualified names (and DescMap = map<X,Y> is template-dependent) to be
preceded by the `typename' keyword:
typedef typename DescMap::const_iterator DescIterator;
^^^^^^^^
--
Alexandre Oliva http://www.dcc.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
oliva@{dcc.unicamp.br,guarana.{org,com}} aoliva@{acm.org,computer.org}
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
** I may forward mail about projects to mailing lists; please use them