This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: gcc-2.95.1 pedantic bug? some map template does not work within template function


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]