[libcxx-commits] [PATCH] D127049: [libc++] Unwrap reverse_iterator<reverse_iterator<Iter>> in __unwrap_iter

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Jun 4 06:12:28 PDT 2022


philnik created this revision.
philnik added reviewers: ldionne, Mordante, var-const.
Herald added a project: All.
philnik requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

Simplify the implementation of `std::copy` and `std::move` by using `__unwrap_iter` and `__rewrap_iter` to unwrap and rewrap `reverse_iterator<reverse_iterator<Iter>>` instead of specializing `__copy_impl` and `__move_impl`.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D127049

Files:
  libcxx/include/__algorithm/copy.h
  libcxx/include/__algorithm/unwrap_iter.h
  libcxx/test/libcxx/algorithms/alg.modifying.operations/copy.pass.cpp
  libcxx/test/libcxx/algorithms/unwrap_iter.compile.pass.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D127049.434264.patch
Type: text/x-patch
Size: 12492 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220604/b65a23e4/attachment-0001.bin>


More information about the libcxx-commits mailing list