This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
template parameter omission msg (not really a bug)
- To: gcc-bugs at gcc dot gnu dot org
- Subject: template parameter omission msg (not really a bug)
- From: Stephane dot Conversy at lri dot fr
- Date: Mon, 22 Oct 2001 14:16:27 +0200
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