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

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Feb 10 13:41:56 PST 2023


ldionne added a comment.

In D140913#4119391 <https://reviews.llvm.org/D140913#4119391>, @tcanens wrote:

> 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.

Ah, yes, I just re-read the e-mail you linked and I get it. I think we already implement LWG 3008 in its current form, but we wouldn't after your fix. Thanks for the heads up, I'll fix this and backport to LLVM 16.


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