On Wed, 2 Jul 2025 at 16:39, Peter Bindels via Std-Proposals <std-proposals@lists.isocpp.org> wrote:

Practically I would go for just subsetting out array new entirely... but that could be complemented with a new type to wrap it safely that type-safely transports it across. Doesn't unique_ptr have a specialization that does this, and if so why not use it - if not why not add it there?

There's a specialization for std::unique_ptr<T[]> but not one for std::unique_ptr<T[N]> because of ... reasons.

std::shared_ptr has specializations for both T[] and T[N], and maybe it's time that we added std::unique_ptr<T[N]> back again (it was in a C++0x draft but got removed).