This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 121a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2026-10-10
(From submission #909.)
The exposition-only expressions begin-expr and end-expr in 8.7 [stmt.expand] paragraph 3 refer to some hypothetical range variable when determined in 8.6.5 [stmt.ranged]. The forms E.begin and end(E) never exist there. Also, after issue 3131, the local definition of range is different.
Proposed resolution (approved by CWG 2026-10-06):
Change in 8.7 [stmt.expand] paragraph 3 as follows:
For an expression E, let the expressions begin-expr and end-expr be determined as specified in 8.6.5 [stmt.ranged], except that the exposition-only variable range is defined by the hypothetical declaration decltype(auto) range = (E);. An expression is expansion-iterable if it does not have array type and either
- begin-expr and end-expr are of the form
Erange.begin() andErange.end(), or- argument-dependent lookups for begin(
Erange) and for end(Erange) each find at least one viable candidate (12.2.3 [over.match.viable]).