Skip to content

Implement rest of P2259R1, Repairing Input Range Adaptors - #2059

Merged
Stephan T. Lavavej (StephanTLavavej) merged 18 commits into
microsoft:mainfrom
miscco:P2259-iterator-fixes
Aug 17, 2021
Merged

Implement rest of P2259R1, Repairing Input Range Adaptors#2059
Stephan T. Lavavej (StephanTLavavej) merged 18 commits into
microsoft:mainfrom
miscco:P2259-iterator-fixes

Conversation

@miscco

@miscco Michael Schellenberger Costa (miscco) commented Jul 14, 2021

Copy link
Copy Markdown
Contributor

I did not add new test yet, will audit them

Fixes #1684.

@StephanTLavavej Stephan T. Lavavej (StephanTLavavej) changed the title Implement rest of P2259 Implement rest of P2259R1, Repairing Input Range Adaptors Jul 14, 2021
@StephanTLavavej Stephan T. Lavavej (StephanTLavavej) added LWG Library Working Group issue ranges C++20/23 ranges labels Jul 14, 2021
Comment thread tests/std/tests/P0896R4_common_iterator/test.cpp Outdated
Comment thread stl/inc/xutility
Comment thread stl/inc/ranges Outdated
Comment thread stl/inc/xutility
Comment thread stl/inc/ranges Outdated
Comment thread stl/inc/ranges Outdated
Comment thread stl/inc/ranges
class _Sentinel;

template <class _Traits> // TRANSITION, LWG-3289
template <class _Base>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to other reviewers: we already implement the equivalent of the split_view changes from P2259R1.

Comment thread stl/inc/ranges Outdated
Comment thread stl/inc/xutility
using reference = iter_rvalue_reference_t<_Iter>;
#else // ^^^ __cpp_lib_concepts / !__cpp_lib_concepts vvv
using reference =
conditional_t<is_reference_v<_Iter_ref_t<_Iter>>, remove_reference_t<_Iter_ref_t<_Iter>>&&, _Iter_ref_t<_Iter>>;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to reviewers: #1939 already implemented the counted_iterator changes from P2259R1.

Comment thread stl/inc/ranges Outdated
@CaseyCarter Casey Carter (CaseyCarter) removed their assignment Aug 3, 2021
... which has been resolved as NAD after adoption of P2259.

Drive-by: Correctly order the `iterator_traits` nested types in three places where they are misordered. (There's some value in using the Standard's consistent ordering.)
... by adding constructors and giving up on the code generation benefits of being ABI-aggregate. Adding a defaulted `<=>` to the partial specializations of the base class `_Ioterator_category_base` allows us to go back to defaulting `==` and `<=>`.
... that I made redundant in the last commit.
@CaseyCarter Casey Carter (CaseyCarter) removed their assignment Aug 12, 2021
Comment thread stl/inc/ranges Outdated
Comment thread tests/std/include/range_algorithm_support.hpp Outdated
Comment thread tests/std/tests/P0896R4_common_iterator/test.cpp
Comment thread stl/inc/iterator
@StephanTLavavej

Copy link
Copy Markdown
Member

I'm mirroring this to an MSVC-internal PR. Please notify me if any further changes are pushed.

@StephanTLavavej
Stephan T. Lavavej (StephanTLavavej) merged commit 6342084 into microsoft:main Aug 17, 2021
@StephanTLavavej

Copy link
Copy Markdown
Member

Thanks for implementing these repairs for broken Standardese! 🏚️ 🛠️ 🏡

@miscco
Michael Schellenberger Costa (miscco) deleted the P2259-iterator-fixes branch August 21, 2021 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

LWG Library Working Group issue ranges C++20/23 ranges

Projects

None yet

Development

Successfully merging this pull request may close these issues.

P2259R1 Repairing Input Range Adaptors And counted_iterator

5 participants