Title
Argument-dependent lookup of begin and end
Status
dup
Section
8.6.5 [stmt.ranged]
Submitter
Mike Miller

Created on 2012-01-16.00:00:00 last changed 156 months ago

Messages

Date: 2012-02-15.00:00:00

Rationale (February, 2012):

This issue is a duplicate of issue 1442.

Date: 2022-11-20.07:54:16

According to 8.6.5 [stmt.ranged] paragraph 1, the functions begin and end are looked up “with argument-dependent lookup (6.5.4 [basic.lookup.argdep])” for non-array, non-class types and for class types with no members of those names. It seems surprising that the lookup is different from the lookup that would result if the for statement were replaced by its nominal expansion, i.e., including (as does the referenced section, 6.5.4 [basic.lookup.argdep]) the result of ordinary unqualified lookup as well as the lookup in associated namespaces.

History
Date User Action Args
2012-02-27 00:00:00adminsetmessages: + msg3853
2012-01-16 00:00:00admincreate