Title
Non-member function templates in member access expressions
Status
cd1
Section
_N4868_.6.5.6 [basic.lookup.classref]
Submitter
fvali

Created on 1999-07-31.00:00:00 last changed 189 months ago

Messages

Date: 2008-06-15.00:00:00

[Voted into the WP at the June, 2008 meeting.]

Date: 2006-11-15.00:00:00

Proposed Resolution (November, 2006):

Change _N4868_.6.5.6 [basic.lookup.classref] paragraph 1 as follows:

In a class member access expression (7.6.1.5 [expr.ref]), if the . or -> token is immediately followed by an identifier followed by a <, the identifier must be looked up to determine whether the < is the beginning of a template argument list (13.3 [temp.names]) or a less-than operator. The identifier is first looked up in the class of the object expression. If the identifier is not found, it is then looked up in the context of the entire postfix-expression and shall name a class or function template...
Date: 2021-02-24.00:00:00

_N4868_.6.5.6 [basic.lookup.classref] paragraph 1 says,

In a class member access expression (7.6.1.5 [expr.ref] ), if the . or -> token is immediately followed by an identifier followed by a <, the identifier must be looked up to determine whether the < is the beginning of a template argument list (13.3 [temp.names] ) or a less-than operator. The identifier is first looked up in the class of the object expression. If the identifier is not found, it is then looked up in the context of the entire postfix-expression and shall name a class or function template.

There do not seem to be any circumstances in which use of a non-member template function would be well-formed as the id-expression of a class member access expression.

History
Date User Action Args
2008-10-05 00:00:00adminsetstatus: dr -> cd1
2008-07-27 00:00:00adminsetmessages: + msg1738
2008-06-29 00:00:00adminsetstatus: ready -> dr
2008-03-17 00:00:00adminsetstatus: review -> ready
2008-02-03 00:00:00adminsetmessages: + msg1572
2008-02-03 00:00:00adminsetstatus: open -> review
1999-07-31 00:00:00admincreate