[PATCH] D49317: Move __construct_forward (etc.) out of std::allocator_traits.
Marshall Clow via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 30 07:25:29 PDT 2018
mclow.lists added a comment.
I am not in favor of this patch.
I'm in favor of fixing the problem that Arthur has described, but not like this, for the following reasons:
- Conceptually, these are (similar to) "Allocator-based versions of the algorithms proposed in P0040 <https://wg21.link/P0040>", and should (probably? possibly?) look more like them.
- Mainly, though, I think that the goal of this patch (which is see as 'getting to memcpy') is not the direction that libc++ should take. Instead, we should be writing simple loops that the compiler can optimize into a call to memcpy if it chooses. Having calls to `memcpy` in the code paths makes it impossible to "constexp-ify" this code. (See https://libcxx.llvm.org/cxx2a_status.html (comments on `std::copy` and https://bugs.llvm.org/show_bug.cgi?id=25165).
Repository:
rCXX libc++
https://reviews.llvm.org/D49317
More information about the cfe-commits
mailing list