Skip to content

Conversation

@miscco
Copy link
Contributor

@miscco miscco commented Oct 27, 2020

This is not fully functional as I has hit a roadblock, trying to understand why ranges::view<EV> breaks due to ranges::end not being available.

@CaseyCarter: any ideas what is going on here?

@miscco miscco requested a review from a team as a code owner October 27, 2020 12:00
Co-authored-by: S. B. Tam <cpplearner@outlook.com>
@cpplearner
Copy link
Contributor

Note that elements_view as specified in the current WD is broken. See LWG-3406.

@miscco
Copy link
Contributor Author

miscco commented Oct 27, 2020

Note that elements_view as specified in the current WD is broken. See LWG-3406.

Awesome, thanks for the heads up 😺

@StephanTLavavej StephanTLavavej added cxx20 C++20 feature ranges C++20/23 ranges labels Oct 27, 2020
@CaseyCarter CaseyCarter self-assigned this Oct 27, 2020
miscco and others added 2 commits October 28, 2020 07:47
Co-authored-by: Casey Carter <cartec69@gmail.com>
Co-authored-by: S. B. Tam <cpplearner@outlook.com>
Copy link
Contributor

@CaseyCarter CaseyCarter left a comment

Choose a reason for hiding this comment

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

Changes look good - I think we're only missing some conditional noexcept test coverage now (#1406 (comment)).

product code:
* Define `iterator_concept` so the view can adapt ranges whose iterators have no `iterator_category` (This is how we've dealt with LWG-3289 elsewhere.)

* Don't try to modify members of constant iterators

* `_Sentinel`'s friends are not friends of `_Iterator`

test:
* Silence shadowing warnings by using the global `expected_keys` and `expected_values` instead of passing them to `test_one` via parameters with the same names.

* Replace references to `EV` with `R` since they name the same type

* Don't `forward` the same rvalue input range repeatedly
Copy link
Contributor

@CaseyCarter CaseyCarter left a comment

Choose a reason for hiding this comment

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

Changes look good - I think we're only missing some conditional noexcept test coverage now (#1406 (comment)).

Nice try, but you were wrong. Fixed up a few small issues and I think this is now good to go.

@CaseyCarter CaseyCarter removed their assignment Oct 30, 2020
Copy link
Member

@StephanTLavavej StephanTLavavej left a comment

Choose a reason for hiding this comment

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

(This is a very incomplete review; I'll resume reviewing later this week)

@StephanTLavavej StephanTLavavej self-assigned this Nov 3, 2020
Copy link
Member

@StephanTLavavej StephanTLavavej left a comment

Choose a reason for hiding this comment

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

This looks great, thanks! All I found were extremely minor nitpicks so I'll validate and push changes.

Copy link
Member

@StephanTLavavej StephanTLavavej left a comment

Choose a reason for hiding this comment

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

@CaseyCarter I pushed small changes after you approved.

@StephanTLavavej StephanTLavavej removed their assignment Nov 4, 2020
... and resolve `common_view` vs. `elements_view` conflict by relocating `common_view` before `reverse_view` where it belongs.
@CaseyCarter
Copy link
Contributor

@CaseyCarter I pushed small changes after you approved.

@StephanTLavavej I pushed what look like bug changes after you approved: common_view and elements_view conflicted by being at the same point in <ranges>, which I resolved by relocating common_view before reverse_view in proper synopsis order. There are no other changes in that commit, it's just a cut-n-paste job.

@CaseyCarter
Copy link
Contributor

@StephanTLavavej I pushed what look like bug changes after you approved: common_view and elements_view conflicted by

Err, "big changes". This is too funny to edit in place, I'm leaving the typo for posterity ;)

StephanTLavavej added a commit to StephanTLavavej/STL that referenced this pull request Nov 5, 2020
@StephanTLavavej StephanTLavavej self-assigned this Nov 5, 2020
StephanTLavavej added a commit to StephanTLavavej/STL that referenced this pull request Nov 5, 2020
@StephanTLavavej
Copy link
Member

FYI @CaseyCarter, I've pushed a fix after you approved, working around an internal compiler assertion in the test that I've reduced and reported.

@StephanTLavavej
Copy link
Member

  • git automatically merged <ranges>; Implement drop_while_view #1366 added drop_while_view next to where this PR moved common_view. I double-checked that they're in that order (synopsis order).
  • Fixed trivial merge conflicts:
    • In tests/std/test.lst, Implement drop_while_view #1366 added P0896R4_views_drop_while[_death] and this PR added P0896R4_views_elements. Accepted both, in that order (sorted order).
    • In P0896R4_ranges_range_machinery/test.cpp, Implement drop_while_view #1366 added a line testing drop_while and this PR added a line testing elements<42>. Accepted both, in that order (sorted order).

@StephanTLavavej StephanTLavavej merged commit 7fd6501 into microsoft:master Nov 7, 2020
@StephanTLavavej
Copy link
Member

Thanks for implementing these crucial elements of ranges; customers will be able to view them in VS 2019 16.9 Preview 2. 😹

@StephanTLavavej StephanTLavavej mentioned this pull request Nov 7, 2020
@miscco miscco deleted the elements_view branch November 7, 2020 20:45
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.

4 participants