Date: Mon, 20 May 2024 15:42:25 +0100
On Mon, May 20, 2024 at 2:07 PM Frederick Virchanza Gotham wrote:
>
> On Mon, May 20, 2024 at 1:31 PM Lénárd Szolnoki wrote:
> >
> > I think if you are going to propose a barebones solution with many
> > undefined behavior traps, than what should be done is to just expose the
> > return slot to the function body as storage, without automatically
> > constructing anything there. Then it's the responsibility of the
> > function to populate the return slot, if the function exits by exception
> > or to ensure that the return slot is empty, if it exits by exception.
>
>
> That's exactly what I did here <snip>
If anyone likes the idea of having total control over the "return
slot", I've started writing a paper entitled "Return slot for NRVO":
http://www.virjacode.com/papers/returnslot.htm
>
> On Mon, May 20, 2024 at 1:31 PM Lénárd Szolnoki wrote:
> >
> > I think if you are going to propose a barebones solution with many
> > undefined behavior traps, than what should be done is to just expose the
> > return slot to the function body as storage, without automatically
> > constructing anything there. Then it's the responsibility of the
> > function to populate the return slot, if the function exits by exception
> > or to ensure that the return slot is empty, if it exits by exception.
>
>
> That's exactly what I did here <snip>
If anyone likes the idea of having total control over the "return
slot", I've started writing a paper entitled "Return slot for NRVO":
http://www.virjacode.com/papers/returnslot.htm
Received on 2024-05-20 14:42:39