[libcxx-commits] [PATCH] D103327: [libc++] NFC: Move std::copy to its own header
Arthur O'Dwyer via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri May 28 14:49:32 PDT 2021
Quuxplusone added a comment.
>> But the latter would force all libc++ users of std::copy to depend on large swaths of <ranges>, so the former is the lesser evil.)
> Users can only obtain std::copy by including <algorithm>
@cjdb, you misunderstand what I mean when I say "libc++ users of std::copy." Today, std::copy is used by libc++ in these headers:
$ git grep -l '_VSTD::copy('
__bit_reference
__string
algorithm
bitset
deque
locale
random
regex
valarray
vector
Whereas any part of `<ranges>` at all is included by only these headers:
$ git grep -l '<_*ranges' | grep -v ^__ranges
ranges
span
string_view
version
(where `<span>` and `<string_view>` include only `enable_borrowed_range.h`, and `<version>` is a false positive from a comment).
So, forcing all these libc++ users of `_VSTD::copy` to include large swaths of `<ranges>` would indeed be a tragedy.
(@ldionne, you understood my comment, right? or at the very least you understand it now?)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103327/new/
https://reviews.llvm.org/D103327
More information about the libcxx-commits
mailing list