Section: 24.3.1 [iterator.requirements.general] Status: Resolved Submitter: Marc Aldorasi Opened: 2018-05-07 Last modified: 2020-09-06
Priority: 3
View all other issues in [iterator.requirements.general].
View all issues with Resolved status.
Discussion:
In [iterator.requirements.general] paragraph 6, contiguous iterators are defined in terms of general iterators, not random-access iterators. Since the defining expressions require random-access and the original paper's introduction describes contiguous iterators as a refinement of random-access iterators, contiguous iterators should be defined in terms of random-access iterators.
[2018-06-18 after reflector discussion]
Priority set to 3
Previous resolution [SUPERSEDED]:
This wording is relative to N4741.
Edit 24.3.1 [iterator.requirements.general] as indicated:
-6- Random-access i
Iterators that further satisfy the requirement that, for integral valuesn
and dereferenceable iterator valuesa
and(a + n)
,*(a + n)
is equivalent to*(addressof(*a) + n)
, are called contiguous iterators. [Note: For example, the type "pointer toint
" is a contiguous iterator, butreverse_iterator<int *>
is not. For a valid iterator range[a, b)
with dereferenceable a, the corresponding range denoted by pointers is[addressof(*a), addressof(*a) + (b - a))
;b
might not be dereferenceable. — end note]
[2020-05-03 Reflector discussion]
Resolved by P0894R4.
Rationale:
Resolved by P0894R4Proposed resolution: