This is the mail archive of the gcc@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]
Other format: [Raw text]

Re: Template functions with STL in gcc 3.2.2


Rob Emanuele wrote:
Hello,

I've got two template functions below.  They compile and work under Visual
C++ (which does let some weird code through).  Using GCC 3.2.2 the second
fucntion will not compile.  The line "T::const_iterator it = group.begin();"
shows a "parse error befire '=' token".

Any ideas why it can't compile that?
you are missing a typename. [14.6] of the std will tell you why you
have to say
	typename T::const_iterator it = ...

nathan

--
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
         The voices in my head said this was stupid too
nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk



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