[libcxx-commits] [libcxx] [libc++] Correctly handle custom deleters in hardened unique_ptr<T[]> (PR #110685)

Nico Weber via libcxx-commits libcxx-commits at lists.llvm.org
Tue Oct 1 11:39:05 PDT 2024


nico wrote:


> I am iffy about exposing a vendor extension for this. Instead I think it would make more sense to pursue standardization of `make_unique`-like APIs that support a custom deleter.

How does would that API help? Would it call `new []` internally for `T[]`s and require the custom deleter to eventually call `delete[]`?

(To be clear I agree about the iffy and don't want to argue for anything here, just asking for my understanding.)

https://github.com/llvm/llvm-project/pull/110685


More information about the libcxx-commits mailing list