[libcxx-commits] [PATCH] D124328: [libc++] Forward more often to memmove in copy
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jun 2 08:25:59 PDT 2022
ldionne accepted this revision.
ldionne added a comment.
This revision is now accepted and ready to land.
LGTM, but let's fix the failing CI tests. Thanks!
Comment at: libcxx/include/__algorithm/copy.h:113
+pair<reverse_iterator<reverse_iterator<_InIter> >, reverse_iterator<reverse_iterator<_OutIter> > >
+__copy_impl(reverse_iterator<reverse_iterator<_InIter> > __first,
+ reverse_iterator<reverse_iterator<_Sent> > __last,
I would like to investigate (in a different patch if the experiment turns out positive) the possibility of overloading `__unwrap_iter` (and `__rewrap_iter`) for `reverse_iterator<reverse_iterator<It>>` more generally. If that works out, we would get some added benefits in other algorithms as well for free, and this overload could go away entirely.
Comment at: libcxx/test/libcxx/algorithms/alg.modifying.operations/copy.pass.cpp:14
+// this test checks that std::copy forwards to memmove when appropriate.
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the libcxx-commits