Title
Contiguous Iterators should always be Random-Access
Status
resolved
Section
[iterator.requirements.general]
Submitter
Marc Aldorasi

Created on 2018-05-07.00:00:00 last changed 55 months ago

Messages

Date: 2020-05-03.20:13:03
Resolved by

Rationale:

P0894R4
Date: 2020-05-03.00:00:00

[ 2020-05-03 Reflector discussion ]

Resolved by P0894R4.

Date: 2018-06-18.00:00:00

[ 2018-06-18 after reflector discussion ]

Priority set to 3

Previous resolution [SUPERSEDED]:

This wording is relative to N4741.

  1. Edit [iterator.requirements.general] as indicated:

    -6- Random-access iIterators that further satisfy the requirement that, for integral values n and dereferenceable iterator values a and (a + n), *(a + n) is equivalent to *(addressof(*a) + n), are called contiguous iterators. [Note: For example, the type "pointer to int" is a contiguous iterator, but reverse_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]

Date: 2018-05-07.00:00:00

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.

History
Date User Action Args
2020-05-03 20:13:03adminsetmessages: + msg11267
2020-05-03 20:13:03adminsetstatus: new -> resolved
2018-06-19 05:49:11adminsetmessages: + msg9948
2018-05-10 17:42:24adminsetmessages: + msg9846
2018-05-07 00:00:00admincreate