Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LWG-3880: Clarify operator+= complexity for {chunk,stride}_view::iterator #3554

Merged
merged 3 commits into from
Mar 14, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 4 additions & 16 deletions stl/inc/ranges
Original file line number Diff line number Diff line change
Expand Up @@ -6681,14 +6681,8 @@ namespace ranges {
"cannot advance chunk_view iterator past end");
}
#endif // _ITERATOR_DEBUG_LEVEL != 0

// Per to-be-filed LWG issue (See GH-2995)
if constexpr (sized_sentinel_for<_Base_sentinel, _Base_iterator>) {
_Missing = _RANGES advance(_Current, _Count * _Off, _End);
} else {
_Current += static_cast<difference_type>(_Count * (_Off - 1));
_Missing = _RANGES advance(_Current, _Count, _End);
}
_RANGES advance(_Current, _Count * (_Off - 1));
JMazurkiewicz marked this conversation as resolved.
Show resolved Hide resolved
_Missing = _RANGES advance(_Current, _Count, _End);
CaseyCarter marked this conversation as resolved.
Show resolved Hide resolved
} else if (_Off < 0) {
_Current += static_cast<difference_type>(_Count * _Off + _Missing);
_Missing = 0;
Expand Down Expand Up @@ -7641,14 +7635,8 @@ namespace ranges {
"cannot advance stride_view iterator past end");
}
#endif // _ITERATOR_DEBUG_LEVEL != 0

// Per to-be-filed LWG issue (See GH-2995)
if constexpr (sized_sentinel_for<_Base_sentinel, _Base_iterator>) {
_Missing = _RANGES advance(_Current, _Stride * _Off, _End);
} else {
_Current += static_cast<difference_type>(_Stride * (_Off - 1));
_Missing = _RANGES advance(_Current, _Stride, _End);
}
_RANGES advance(_Current, _Stride * (_Off - 1));
_Missing = _RANGES advance(_Current, _Stride, _End);
} else if (_Off < 0) {
_Current += static_cast<difference_type>(_Stride * _Off + _Missing);
_Missing = 0;
Expand Down