Title
Valid uses of "::template"
Status
tc1
Section
17.2 [temp.names]
Submitter
Daveed Vandevoorde

Created on 1998-05-28.00:00:00 last changed 208 months ago

Messages

Date: 1999-04-15.00:00:00

Proposed Resolution (04/99): Append to 17.2 [temp.names] paragraph 5:

Furthermore, names of member templates shall not be prefixed by the keyword template if the postfix-expression or qualified-id does not appear in the scope of a template. [Note: just as is the case with the typename prefix, the template prefix is allowed in cases where it is not strictly necessary; i.e., when the expression on the left of the -> or ., or the nested-name-specifier is not dependent on a template-parameter. ]
Date: 2004-09-10.00:00:00

I have a request for clarification regarding a issue similar to John Wiegley's, but wrt. the ::template syntax. More precisely, where is

    X::template Y
allowed? (It is required for dependent X where Y is a template-id, I believe, but it doesn't seem to be disallowed elsewhere.)

The question also holds for '.template' and '->template'.

History
Date User Action Args
2003-04-25 00:00:00adminsetstatus: dr -> tc1
1999-09-14 00:00:00adminsetmessages: + msg210
1999-09-14 00:00:00adminsetstatus: drafting -> dr
1998-05-28 00:00:00admincreate