This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 114a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2024-04-18


1445. Argument-dependent lookup of begin and end

Section: 8.6.5  [stmt.ranged]     Status: dup     Submitter: Mike Miller     Date: 2012-01-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.

Rationale (February, 2012):

This issue is a duplicate of issue 1442.