C++ Logo


Advanced search

Re: [std-proposals] Making contiguous objects

From: Arthur O'Dwyer <arthur.j.odwyer_at_[hidden]>
Date: Sun, 12 Mar 2023 15:05:00 -0400
On Sun, Mar 12, 2023 at 2:50 PM Breno GuimarĂ£es <brenorg_at_[hidden]> wrote:

> > All our use-cases so far are use-cases for the
> allocating-but-not-constructing entrypoint.
> Even on std::make_shared<std::string[]>(10) ? That is a case of allocating
> and constructing.

That default-constructs the 10 string objects, true. But it *doesn't*
default-construct the 1 _ControlBlock object that precedes them:
So an entrypoint that default-constructs all Ns... of the Ts... isn't
helpful to this use-case.



Received on 2023-03-12 19:05:13