Date: Mon, 20 May 2024 14:07:20 +0100
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:
http://www.virjacode.com/papers/paper_nrvo_latest.pdf
>
> 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:
http://www.virjacode.com/papers/paper_nrvo_latest.pdf
Received on 2024-05-20 13:07:33