[libcxx-commits] [PATCH] D154017: Cleanup __uninitialized_temporary_buffer internals.
Eric Fiselier via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jun 29 11:14:23 PDT 2023
EricWF added inline comments.
================
Comment at: libcxx/include/__memory/uninitialized_buffer.h:35
size_t __count_;
- _Destructor __destructor_;
----------------
ldionne wrote:
> IIUC, you're not destroying the elements in the buffer anymore, which seems like a bug.
We never we destroying the elements in the buffer.
The deleter template parameter was always `nop`, but the complexity hid this issue. It's also not possible for the unique_ptr to know how many elements were actually created when it gets deleted, so the API was inherently unsafe from the start. I had assumed the algorithms were doing it because unique_ptr certainly wasn't .
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D154017/new/
https://reviews.llvm.org/D154017
More information about the libcxx-commits
mailing list