Bug when parsing template-functions?
Nathan Sidwell
nathan@codesourcery.com
Mon Nov 17 16:03:00 GMT 2003
Thimo Neubauer wrote:
> template <int dim>
> void foo2() {
> Entity<dim> e;
>
> // works like above
> e.other();
> e.print("test");
>
> // fails with syntax error
> e.test<1>();
e.template test<1> ();
e's type is dependent, so at parse time 'test' is presumed to be not a
template and thus the '<' is a less than operator, rather than starting
a template argument list.
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
More information about the Gcc-help
mailing list