[Bug c++/67621] Syntax error for template function of template class
physik3 at gmx dot net
gcc-bugzilla@gcc.gnu.org
Fri Sep 18 12:09:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67621
--- Comment #2 from physik3 at gmx dot net ---
Hi.
(In reply to Jonathan Wakely from comment #1)
> (In reply to physik3 from comment #0)
> > foo.foo<int>(); // this line gives a compiler error
>
> This needs to be:
>
> foo.template foo<int>();
>
> See https://womble.decadent.org.uk/c++/template-faq.html#disambiguation
Thank you, you are completely right.
Would it be hard to implement that GCC prints a message like "Did you forget
keyword template?" in this situation?
More information about the Gcc-bugs
mailing list