Skip to content

Conversation

@CaseyCarter
Copy link
Contributor

@CaseyCarter CaseyCarter commented Aug 3, 2020

<algorithm>

  • Promote _Convertible_from and in_out_result to <xmemory> for use by the specialized memory algorithms in<memory>, (notably including ranges::uninitialized_move).

<xmemory>

  • Teach _Destroy_in_place to destroy arrays.
  • Teach _Destroy_range to accept different sentinel types.

<memory>

  • Implement exposition-only concepts _No_throw_input_iterator, _No_throw_sentinel_for, _No_throw_forward_iterator, _No_throw_input_range, and _No_throw_forward_range (with test coverage in tests/std/tests/P0896R4_ranges_algorithm_machinery).
  • Implement ranges::uninitialized_move (with test tests/std/tests/P0896R4_ranges_alg_uninitialized_move).

tests/std/include/range_algorithm_support.hpp

  • test::iterator's iter_move should yield an xvalue instead of a prvalue to eliminate the redundant extra move in *x = iter_move(y).

`<algorithm>`
* Promote `_Convertible_from` and `in_out_result` to `<xutility>` for use by `ranges::_Uninitialized_move_unchecked`.

`<xmemory>`
* Teach `_Destroy_in_place` to destroy arrays.
* Teach `_Destroy_range` to accept different sentinel types.
* Implement exposition-only concepts `_No_throw_input_iterator`, `_No_throw_sentinel_for`, and `_No_throw_forward_iterator` (with test coverage in `tests/std/tests/P0896R4_ranges_algorithm_machinery`).
* Implement `ranges::_Uninitialized_move_unchecked` to support Range algorithms which allocate.

`<memory>`
* Implement exposition-only concepts `_No_throw_input_range` and `_No_throw_forward_range` (with test coverage in `tests/std/tests/P0896R4_ranges_algorithm_machinery`).
* Implement `ranges::uninitialized_move` in terms of `ranges::_Uninitialized_move_unchecked` (with test `tests/std/tests/P0896R4_ranges_alg_uninitialized_move`).

`tests/std/include/range_algorithm_support.hpp`
* `test::iterator`'s `iter_move` should yield an xvalue instead of a prvalue to eliminate the redundant extra move in `*x = iter_move(y)`.
@CaseyCarter CaseyCarter added cxx20 C++20 feature ranges C++20/23 ranges labels Aug 3, 2020
@CaseyCarter CaseyCarter requested a review from a team as a code owner August 3, 2020 19:56
@CaseyCarter CaseyCarter mentioned this pull request Aug 3, 2020
@CaseyCarter
Copy link
Contributor Author

There were substantial changes here after review, so I'm moving this back to Initial Review.

@CaseyCarter CaseyCarter changed the title Implement ranges::uninitialized_move Implement ranges::uninitialized_move Aug 5, 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.

I see no remaining issues except for a spelling nitpick.

@mnatsuhara mnatsuhara self-assigned this Aug 5, 2020
@StephanTLavavej

This comment has been minimized.

@azure-pipelines

This comment has been minimized.

@StephanTLavavej StephanTLavavej self-assigned this Aug 12, 2020
@StephanTLavavej StephanTLavavej merged commit 7f29487 into microsoft:master Aug 12, 2020
@StephanTLavavej
Copy link
Member

Thanks! I don't have a funny joke here - this is simply raw space where a funny joke can be move-constructed later.

@CaseyCarter CaseyCarter deleted the uninit_move branch August 13, 2020 01:31
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