[libcxx-commits] [PATCH] D101948: [libc++] Future-proof std::copy for ranges

Zoe Carver via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri May 28 08:55:20 PDT 2021


zoecarver added inline comments.


================
Comment at: libcxx/include/__algorithm/copy.h:28
+
+namespace __copy_impl {
+    template <class _InputIterator, class _Sentinel, class _OutputIterator>
----------------
What's the benefit of putting these into a namespace? Once we add the CPOs we're going to create two more namespaces. I think this namespace might add a bit of confusions, and I don't see any benefit (especially in such a small file).


================
Comment at: libcxx/include/__algorithm/unwrap_iter.h:1
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
----------------
My personal preference: do this in three PRs:
1. Move unwrap_iter into its own header. This you could just land without review; it's an obviously correct nfc.
2. Move copy into its own header.
3. Add the CPO. 

I'd also support combining 2 and 3. 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101948/new/

https://reviews.llvm.org/D101948



More information about the libcxx-commits mailing list