Re: Bug when parsing template-functions?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx    ::     http://www.planetfall.pwp.blueyonder.co.uk



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux