LWG-3543 Definition of when counted_iterators refer to the same sequence isn't quite right
In #1965, @frederick-vs-ja categorized this as:
Implemented at first, only comments should be updated.
_Same_sequence performs as least increments as possible, which is still OK for current wording
The comment is:
|
template <common_with<_Iter> _Other>
|
|
friend constexpr void _Same_sequence(
|
|
const counted_iterator& _Left, const counted_iterator<_Other>& _Right) noexcept {
|
|
// Per N4861 [counted.iterator]/2, two counted_iterators x and y refer to elements of the same sequence iff
|
|
// next(x.base(), x.count()) and next(y.base(), y.count()) "refer to the same element." Iterator equality is a
|
|
// fair proxy for this condition.
|
|
if constexpr (forward_iterator<_Iter> && forward_iterator<_Other>) {
|
I agree that the comment should be updated to cite WG21-N4892's new wording. (It appears that this isn't a case where the comment should be removed entirely.)
LWG-3543 Definition of when
counted_iterators refer to the same sequence isn't quite rightIn #1965, @frederick-vs-ja categorized this as:
The comment is:
STL/stl/inc/iterator
Lines 1278 to 1284 in 6fe2eae
I agree that the comment should be updated to cite WG21-N4892's new wording. (It appears that this isn't a case where the comment should be removed entirely.)