Title
Definition of when counted_iterators refer to the same sequence isn't quite right
Status
ready
Section
[counted.iterator]
Submitter
Tim Song

Created on 2021-04-21.00:00:00 last changed yesterday

Messages

Date: 2021-05-10.16:28:00

Proposed resolution:

This wording is relative to N4885.

  1. Modify [counted.iterator] as indicated:

    -3- Two values i1 and i2 of types counted_iterator<I1> and counted_iterator<I2> refer to elements of the same sequence if and only if there exists some integer n such that next(i1.base(), i1.count() + n) and next(i2.base(), i2.count() + n) refer to the same (possibly past-the-end) element.

Date: 2021-05-15.00:00:00

[ 2021-05-10; Reflector poll ]

Set status to Tentatively Ready after five votes in favour during reflector poll.

Date: 2021-04-21.00:00:00

[counted.iterator]/3 says:

Two values i1 and i2 of types counted_iterator<I1> and counted_iterator<I2> refer to elements of the same sequence if and only if next(i1.base(), i1.count()) and next(i2.base(), i2.count()) refer to the same (possibly past-the-end) element.

However, some users of counted_iterator (such as take_view) don't guarantee that there are count() elements past base(). It seems that we need to rephrase this definition to account for such uses.

History
Date User Action Args
2021-05-10 16:28:00adminsetmessages: + msg11795
2021-05-10 16:28:00adminsetstatus: new -> ready
2021-04-24 16:05:52adminsetmessages: + msg11781
2021-04-21 00:00:00admincreate