-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Implement rest of P2259R1, Repairing Input Range Adaptors #2059
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
Conversation
Co-authored-by: Casey Carter <[email protected]>
02955d9
to
30b155d
Compare
@@ -4020,18 +4018,20 @@ namespace ranges { | |||
template <bool _Const> | |||
class _Sentinel; | |||
|
|||
template <class _Traits> // TRANSITION, LWG-3289 | |||
template <class _Base> |
There was a problem hiding this comment.
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.
#ifdef __cpp_lib_concepts | ||
using reference = iter_rvalue_reference_t<_Iter>; | ||
using iterator_concept = input_iterator_tag; | ||
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>>; |
There was a problem hiding this comment.
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.
... 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.
... even in stateless classes for which `<=>` is a constant function.
I'm mirroring this to an MSVC-internal PR. Please notify me if any further changes are pushed. |
Thanks for implementing these repairs for broken Standardese! 🏚️ 🛠️ 🏡 |
I did not add new test yet, will audit them
Fixes #1684.