`in` parameters made useful
r.sagitario at gmx.de
Tue Aug 4 18:42:15 UTC 2020
On 04/08/2020 11:35, Mathias LANG wrote:
> On Saturday, 1 August 2020 at 07:48:10 UTC, Rainer Schuetze wrote:
>> Maybe we can leverage that and define that if the ABI uses a reference
>> for an `in`-value, the compiler may/must elide an extra copy. That
>> avoids having to define our own rule set.
> Do you have a link ? I did some research beforehand, but all I could
> find was about NRVO and throwing exception, nothing about actually
> promoting values to references.
> Itanium C++ ABI doesn't have anything:
Well, this already says as much for non-POD data IIUC.
The System V ABI for C that is used for PODs doesn't seem to use
> Nor does MS:
This says for non-register-sized data: "Structs or unions of other sizes
are passed as a pointer to memory allocated by the caller."
More information about the Digitalmars-d