[libcxx-commits] [PATCH] D130968: [libc++][ranges] Fix the return value of `{copy, move}_backward`.
Konstantin Varlamov via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Aug 2 22:22:40 PDT 2022
var-const marked 2 inline comments as done.
var-const added inline comments.
================
Comment at: libcxx/include/__algorithm/ranges_move_backward.h:44-45
+ auto __last_iter = ranges::next(__first, std::move(__last));
+ auto __ret = ranges::move(std::make_reverse_iterator(__last_iter),
std::make_reverse_iterator(__first),
std::make_reverse_iterator(__result));
----------------
ldionne wrote:
> philnik wrote:
> > Pre-existing: Could you make `copy` and `move` consistent w.r.t. using `__reverse_range`?
> I'm neutral on this given that we're about to refactor these algorithms significantly to remove their dependency on `reverse_iterator` altogether.
I'm inclined to leave as is for the reason that @ldionne mentioned (though I agree it's a good idea).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130968/new/
https://reviews.llvm.org/D130968
More information about the libcxx-commits
mailing list