c++/795
Nathan Sidwell
nathan@codesourcery.com
Tue Nov 28 01:39:00 GMT 2000
Martin Sebor wrote:
> The distinction (which isn't made in 14.2 but which the note in CWG issue 30
> clarifies) is between what's on the left of ., ->, and :: and what's on the
> right. If the lhs of the operator depends on a template parameter, the keyword
> template is required. If the lhs doesn't depend on a template parameter, the
> keyword is optional.
Ah, I get it, I was having a thinko about `scope'.
> In the testcase, though, even if the error were appropriate (which I'm convinced
> it's not), there would be a problem with the compiler accepting the first
> construct. So no matter how you look at it, there's a problem.
> A().foo<T>(); // okay
> a[0].foo<T>(); // error? NOT!
ouch!
I'll retag the bug report - thanks!
nathan
--
Dr Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
'But that's a lie.' - 'Yes it is. What's your point?'
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org
More information about the Gcc-bugs
mailing list