Re: [PATCH] libstdc++: P0769R2 Add shift to

2020-03-02 Thread Jonathan Wakely
On 02/03/20 10:03 +0100, Stephan Bergmann wrote: On 21/02/2020 20:29, Patrick Palka wrote: diff --git a/libstdc++-v3/include/bits/ranges_algo.h b/libstdc++-v3/include/bits/ranges_algo.h index 7de1072abf0..c36afc6e19b 100644 --- a/libstdc++-v3/include/bits/ranges_algo.h +++

Re: [PATCH] libstdc++: P0769R2 Add shift to

2020-03-02 Thread Stephan Bergmann
On 21/02/2020 20:29, Patrick Palka wrote: diff --git a/libstdc++-v3/include/bits/ranges_algo.h b/libstdc++-v3/include/bits/ranges_algo.h index 7de1072abf0..c36afc6e19b 100644 --- a/libstdc++-v3/include/bits/ranges_algo.h +++ b/libstdc++-v3/include/bits/ranges_algo.h @@ -3683,6 +3683,54 @@

Re: [PATCH] libstdc++: P0769R2 Add shift to

2020-02-24 Thread Jonathan Wakely
moved-from state at the end of the > algorithm. Here is a version of the patch that instead adds something > akin to the reference implementation and improves the tests to verify > this moved-from property of both algorithms. > > -- >8 -- > > Subject: [PATCH] libstdc++: P0769R2 Add shift

Re: [PATCH] libstdc++: P0769R2 Add shift to

2020-02-24 Thread Daniel Krügler
Am Mo., 24. Feb. 2020 um 15:12 Uhr schrieb Patrick Palka : > > On Mon, 24 Feb 2020, Jonathan Wakely wrote: > [...] > > > @@ -3683,6 +3683,98 @@ namespace ranges > > > inline constexpr __prev_permutation_fn prev_permutation{}; > > > > > > } // namespace ranges > > > + > > > + template > > > +

Re: [PATCH] libstdc++: P0769R2 Add shift to

2020-02-24 Thread Patrick Palka
e no longer a part > > of the new range do not end up in a moved-from state at the end of the > > algorithm. Here is a version of the patch that instead adds something > > akin to the reference implementation and improves the tests to verify > > this moved-from property of both algorit

Re: [PATCH] libstdc++: P0769R2 Add shift to

2020-02-24 Thread Jonathan Wakely
up in a moved-from state at the end of the algorithm. Here is a version of the patch that instead adds something akin to the reference implementation and improves the tests to verify this moved-from property of both algorithms. -- >8 -- Subject: [PATCH] libstdc++: P0769R2 Add shift to This pa

Re: [PATCH] libstdc++: P0769R2 Add shift to

2020-02-21 Thread Patrick Palka
do not end up in a moved-from state at the end of the algorithm. Here is a version of the patch that instead adds something akin to the reference implementation and improves the tests to verify this moved-from property of both algorithms. -- >8 -- Subject: [PATCH] libstdc++: P0769R2 Add shi

[PATCH] libstdc++: P0769R2 Add shift to

2020-02-21 Thread Patrick Palka
This patch adds std::shift_left and std::shift_right. Alhough these are STL-style algos, they are nonetheless placed in because they make use of some functions in the ranges namespace that are more easily reachable from than from , namely ranges::next and ranges::swap_ranges. This