Move Constructors - Converting Lvalues to Rvalues
Dukc
ajieskola at gmail.com
Fri Oct 4 09:26:21 UTC 2024
On Thursday, 3 October 2024 at 14:27:37 UTC, Imperatorn wrote:
> On Wednesday, 2 October 2024 at 18:57:24 UTC, Timon Gehr wrote:
>> On 10/2/24 20:00, Walter Bright wrote:
>>> [...]
>>
>> I don't think it affects how overloading works. You just treat
>> it as a by-value argument as far as overloading and lifetime
>> handling is concerned. In terms of ABI however, you pass the
>> argument by reference.
>>
>> [...]
>
> What is the amount we need to pay to not get another attribute?
This probably wouldn't be a language attribute like `@nogc` or
`@trusted`. It would be a simple UDA that is defined as a
compiler intrinsic. It would likely be defined either at
[core.attribute](https://dlang.org/phobos/core_attribute.html),
or somewhere at `core.internal`.
And in any case it wouldn't be anything the D programmer has to
deal with. It'd be used to define DRuntime functions, and maybe
some low-level Phobos / utility library functions. But not at
application code, nor even at normal library code.
More information about the Digitalmars-d
mailing list