[libcxx-commits] [PATCH] D140913: [libc++] implement P1020R1 P1973R1 make_unique[shared]_for_overwrite

Tim Song via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Feb 10 13:28:36 PST 2023


tcanens added a comment.

In D140913#4119271 <https://reviews.llvm.org/D140913#4119271>, @ldionne wrote:

> In D140913#4078953 <https://reviews.llvm.org/D140913#4078953>, @tcanens wrote:
>
>> Per https://lists.isocpp.org/lib/2018/11/9316.php `allocate_shared_for_overwrite` should not call `allocator_traits::destroy`, which I think this implementation does?
>
> Ugh, it shouldn't be destroyed at all? I hadn't read it that way.

It should call the destructor directly, not go through the allocator (since the objects aren't constructed using the allocator).

I need to file an issue to fix the standard.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140913



More information about the libcxx-commits mailing list