[libcxx-commits] [PATCH] D103840: [libcxx][ranges][nfc] Factor out common logic in the copy algorithms.

Zoe Carver via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jun 7 13:55:27 PDT 2021


zoecarver created this revision.
zoecarver added reviewers: ldionne, cjdb, EricWF, Quuxplusone.
Herald added a subscriber: mgorny.
zoecarver requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

Factors out common logic from `std::copy`, `std::copy_backward`, `std::copy_if`, and `std::copy_n` into `__copy_*_impl`. Also adds `__in_out_result` which is the return type for the impl function. This will make adding support for the ranges overloads super easy.

This is an example of how this will be done for //all// algorithms. Once this lands, I'll update all the algorithms, so let's get this review right.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D103840

Files:
  libcxx/include/CMakeLists.txt
  libcxx/include/__algorithm/copy.h
  libcxx/include/__algorithm/in_out_result.h
  libcxx/include/algorithm
  libcxx/include/module.modulemap
  libcxx/test/std/algorithms/robust_against_adl.pass.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D103840.350409.patch
Type: text/x-patch
Size: 10895 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210607/66b7c3cf/attachment-0001.bin>


More information about the libcxx-commits mailing list