C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Stop gap required for NRVO until Anton's paper is assimilated

From: Frederick Virchanza Gotham <cauldwell.thomas_at_[hidden]>
Date: Thu, 18 Jul 2024 23:54:22 +0100
On Thu, Jul 18, 2024 at 4:15 PM Frederick Virchanza Gotham wrote:
>
> I have implemented this on the four main compilers, Microsoft VC++,
> GNU g++, LLVM clang, Intel ICX:
>
> https://msvc.godbolt.org/z/6P7xKdn1T
>
> It still works if you turn on the most extreme optimisations.


I have integrated the above GodBolt into the paper's main GodBolt:

    https://msvc.godbolt.org/z/vq9r5Exz1

Previously there were 4 functions:

* std::construct_modify
* std::construct_modify_with_tuples
* std::invoke_modify
* std::invoke_modify_with_tuples

And now there's a 5th function:

* std::construct_modify_retry

The fifth function is the one that can do loops. Maybe there should
also be "invoke_modify_retry". And perhaps also
"construct_modify_retry_with_tuples" and
"invoke_modify_retry_with_tuples".

Received on 2024-07-18 22:54:34