weakly_incrementableSection: 24.3.4.13 [iterator.concept.random.access] Status: C++20 Submitter: Eric Niebler Opened: 2019-09-09 Last modified: 2021-02-25
Priority: 0
View all other issues in [iterator.concept.random.access].
View all issues with C++20 status.
Discussion:
See 24.3.4.13 [iterator.concept.random.access]/2.6, which shows ++ being applied to a prvalue iterator.
[2019-09-24 Issue Prioritization]
Status to Tentatively Ready and priority to 0 after six positive votes on the reflector.
Proposed resolution:
This wording is relative to N4830.
Modify 24.3.4.13 [iterator.concept.random.access] as indicated:
-2- Let
aandbbe valid iterators of typeIsuch thatbis reachable fromaafternapplications of++a, letDbeiter_difference_t<I>, and letndenote a value of typeD.Imodelsrandom_access_iteratoronly if
(2.1) —
(a += n)is equal tob.[…]
(2.6) — If
(a + D(n - 1))is valid, then(a + n)is equal to.++[](I c){ return ++c; }(a + D(n - 1))[…]