]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Use ranges::iter_move in ranges::unique [PR120789]
authorPatrick Palka <ppalka@redhat.com>
Tue, 1 Jul 2025 17:43:09 +0000 (13:43 -0400)
committerPatrick Palka <ppalka@redhat.com>
Tue, 1 Jul 2025 17:43:09 +0000 (13:43 -0400)
commit6f69a68998f601cdb86c65113eb1feddfa9da31a
treea4ce7c1c4b1513a604ef0ad7e502a393143c2958
parentf5282f7402939fdec910ef3743d38edac864eec8
libstdc++: Use ranges::iter_move in ranges::unique [PR120789]

PR libstdc++/120789

libstdc++-v3/ChangeLog:

* include/bits/ranges_algo.h (__unique_fn::operator()): Use
ranges::iter_move(iter) instead of std::move(*iter).
* testsuite/25_algorithms/unique/120789.cc: New test.

Reviewed-by: Tomasz KamiƄski <tkaminsk@redhat.com>
Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/include/bits/ranges_algo.h
libstdc++-v3/testsuite/25_algorithms/unique/120789.cc [new file with mode: 0644]