CWG Issue 1442 (original) (raw)
This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 117a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2025-04-13
1442. Argument-dependent lookup in the range-based for
Section: 8.6.5 [stmt.ranged]Status: CD3Submitter: Mike MillerDate: 2012-01-16
[Moved to DR at the April, 2013 meeting.]
It is not clear whether the reference to argument-dependent lookup in 8.6.5 [stmt.ranged] bullet 1.3 should be “pure” argument-dependent lookup (with no unqualified name lookup component) or the usual lookup that is invoked when argument-dependent lookup is done, i.e., unqualified lookup, potentially augmented by the associated namespaces.
Proposed resolution (October, 2012):
Change 8.6.5 [stmt.ranged] bullet 1.3 as follows:
- otherwise, begin-expr and end-expr arebegin(__range) and end(__range), respectively, wherebegin and end are looked up
with argument-dependent lookupin the associated namespaces (6.5.4 [basic.lookup.argdep]).For the purposes of this name lookup, namespace std is an associated namespace.[_Note:_ Ordinary unqualified lookup (6.5.3 [basic.lookup.unqual]) is not performed. —_end note_]