On Wed, 2 Jul 2025 at 17:06, David Brown via Std-Proposals <std-proposals@lists.isocpp.org> wrote:

It turns out my suggestion was already covered by std::unique_ptr<T[]>.
(I imagine that my idea could have lower overheads, but that's possibly
just because I haven't thought through the details for more complex
cases.  And std::unique_ptr<T[]> has the big advantage of already
existing - a few extra bytes overhead is unlikely to be significant in
real code.)

I don't think there's any overhead. sizeof(unique_ptr<T[]>) == sizeof(T*) and it just stores a pointer to an array allocated with new[].