[libcxx-commits] [PATCH] D103327: [libc++] NFC: Move std::copy to its own header
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Jun 1 19:00:21 PDT 2021
ldionne planned changes to this revision.
ldionne added a comment.
In D103327#2787763 <https://reviews.llvm.org/D103327#2787763>, @Quuxplusone wrote:
>>> 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.)
>
> 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?)
Yes I do. IMO, the solution is to split headers not by their standard clause, but by what they represent logically. So, for example, we wouldn't put `ranges::copy` in `__algorithm/copy.h`, we'd put it in `__ranges/copy.h` (and similarly for everything else in `ranges::`). That gets rid of the issue.
But since we've been splitting by clause (which is OK too), I think we should go for `__iterator/ranges_copy.h`, or any other declination of that that does not bundle things from `ranges::` with things outside of `ranges::`.
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