template keyword not within a template definition

Vincent Torri Vincent.Torri@iecn.u-nancy.fr
Sun Dec 12 20:45:00 GMT 2004


hello,

i'm compiling a program with g++ 3.4.3. I gives me the following error:

error: `template' (as a disambiguator) is only allowed within templates

the error occurs at the following line of the prog:

BufferWindow result( source.GetDimension().template Turn<1>(),
source.GetEnvironment() );

One of my friend told me that this use of the keyword template is allowed
by the standard.

What is more annoying is that, previously, we compiled with 3.3.1 and we
have modified our prog so that g++ 3.3.1 accepts it and the modification
is the line just above...

so, it's annoying that we have to change our prog when the compiler
version changes...

so, what i would like to know is

1) if this use of the keyword template is in the standard or not (that is,
if it's a bug of g++ 3.4.*)
2) if there's a flag to pass to gcc 3.4.3 to allow this use
3) or if there is a way to do what we want to do

we are out of ideas...

thank you very much

Vincent TORRI



More information about the Gcc-help mailing list