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

Implement ranges::subrange and ranges::view_interface #734

Merged
merged 4 commits into from
Apr 25, 2020

Conversation

CaseyCarter
Copy link
Member

@CaseyCarter CaseyCarter commented Apr 21, 2020

Product changes:
<xutility>: Implementations of subrange, view_interface, and borrowed_subrange_t.

Test changes:
std/include/range_algorithm_support.hpp: Remove iter_move overload landmine for non-indirectly_readable test_iterators that hampers detection.
std/tests/P0896R4_ranges_algorithm_machinery: Enable borrowed_subrange_t smoke test.
std/tests/P0896R4_ranges_range_machinery: Validate that subrange is a borrowed_range.
std/tests/P0896R4_ranges_subrange: New test to cover subrange and view_interface.

Product changes:
`<utility>`: declare `tuple`'s overloads of `std::get` so they are visible to the definition of `subrange`'s `_Pair_like` concept in `<xutility>`.
`<xutility>`: Implementations of `subrange`, `view_interface`, and `borrowed_subrange_t`.

Test changes:
`std/include/range_algorithm_support.hpp`: Remove `iter_move` overload landmine for non-`indirectly_readable` `test_iterator`s that hampers detection.
`std/tests/P0896R4_ranges_algorithm_machinery`: Enable `borrowed_subrange_t` smoke test.
`std/tests/P0896R4_ranges_range_machinery`: Validate that `subrange` is a `borrowed_range`.
`std/tests/P0896R4_ranges_subrange`: New test to cover `subrange` and `view_interface`.
@CaseyCarter CaseyCarter added the cxx20 C++20 feature label Apr 21, 2020
@CaseyCarter CaseyCarter requested a review from a team as a code owner April 21, 2020 19:37
@CaseyCarter CaseyCarter self-assigned this Apr 21, 2020
@CaseyCarter CaseyCarter mentioned this pull request Apr 21, 2020
stl/inc/utility Outdated Show resolved Hide resolved
stl/inc/utility Outdated Show resolved Hide resolved
stl/inc/xutility Outdated Show resolved Hide resolved
stl/inc/xutility Show resolved Hide resolved
stl/inc/xutility Outdated Show resolved Hide resolved
stl/inc/xutility Show resolved Hide resolved
stl/inc/xutility Outdated Show resolved Hide resolved
stl/inc/xutility Outdated Show resolved Hide resolved
tests/std/tests/P0896R4_ranges_subrange/test.cpp Outdated Show resolved Hide resolved
stl/inc/xutility Outdated Show resolved Hide resolved
Copy link
Contributor

@miscco miscco left a comment

Choose a reason for hiding this comment

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

I could not leave this without some nitpicks.

That said I am mightily impressed not only by the code but more so by the tests. You nearly had me believing I understand what was going on

stl/inc/xutility Outdated Show resolved Hide resolved
stl/inc/xutility Outdated Show resolved Hide resolved
stl/inc/xutility Show resolved Hide resolved
stl/inc/xutility Outdated Show resolved Hide resolved
stl/inc/xutility Show resolved Hide resolved
@CaseyCarter CaseyCarter merged commit 343e625 into microsoft:master Apr 25, 2020
@CaseyCarter CaseyCarter deleted the subrange branch April 25, 2020 01:59
fengjixuchui added a commit to fengjixuchui/STL that referenced this pull request Apr 25, 2020
Implement ranges::subrange and ranges::view_interface (microsoft#734)
@CaseyCarter CaseyCarter removed their assignment Jun 27, 2020
@StephanTLavavej StephanTLavavej added the ranges C++20/23 ranges label Jul 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cxx20 C++20 feature ranges C++20/23 ranges
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants