template parameter omission msg (not really a bug)
Stephane.Conversy@lri.fr
Stephane.Conversy@lri.fr
Mon Oct 22 05:14:00 GMT 2001
Hello. This snippet doesn't compile:
template <class X>
struct foo {
void bar();
};
template <class X>
void
foo::bar()
{
}
which is right since the definition of foo::bar should be:
template <class X>
void
foo<X>::bar()
{
}
However, the message gcc gives states that there is a "syntax error
before ::", which is rather vague. It would be better if this kind of
common error is detected and a more appropriate message given. I know,
this should be worked on, but I saw that a similar work has been done
when templated parameter in a template ends with operator ">>" instead
of the space-seperated "> >"...
thanks,
stef
More information about the Gcc-bugs
mailing list