]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Add missing std::move to ranges::copy/move/reverse_copy [PR101599]
authorPatrick Palka <ppalka@redhat.com>
Mon, 2 Aug 2021 19:30:15 +0000 (15:30 -0400)
committerPatrick Palka <ppalka@redhat.com>
Tue, 12 Oct 2021 17:56:15 +0000 (13:56 -0400)
commite22db028743ff2f82c2aade4c8003e256ca15a6e
treef96c3ee707e82f6e4b55a603a52b6b02b892ae69
parentd187dfbd038a9be68ceb81a6ce4125d50cb453f9
libstdc++: Add missing std::move to ranges::copy/move/reverse_copy [PR101599]

In passing, this also renames the template parameter _O2 to _Out2 in
ranges::partition_copy and uglifies two of its function parameters,
out_true and out_false.

PR libstdc++/101599

libstdc++-v3/ChangeLog:

* include/bits/ranges_algo.h (__reverse_copy_fn::operator()):
Add missing std::move in return statement.
(__partition_copy_fn::operator()): Rename templtae parameter
_O2 to _Out2.  Uglify function parameters out_true and out_false.
* include/bits/ranges_algobase.h (__copy_or_move): Add missing
std::move to recursive call that unwraps a __normal_iterator
output iterator.
* testsuite/25_algorithms/copy/constrained.cc (test06): New test.
* testsuite/25_algorithms/move/constrained.cc (test05): New test.

(cherry picked from commit 14d8a5ae472ca5743016f37da2dd4770d83dea21)
libstdc++-v3/include/bits/ranges_algo.h
libstdc++-v3/include/bits/ranges_algobase.h
libstdc++-v3/testsuite/25_algorithms/copy/constrained.cc
libstdc++-v3/testsuite/25_algorithms/move/constrained.cc