const ref parameters and r-value references

via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun May 4 04:53:43 PDT 2014


On Sunday, 4 May 2014 at 11:15:59 UTC, Timon Gehr wrote:
> On 05/04/2014 12:58 PM, "Marc Schütz" <schuetzm at gmx.net>" wrote:
>>
>> This means that you will still get a (bit-wise) copy if you 
>> pass in an
>> r-value. But semantically, this is a move, not a copy, so it is
>> potentially cheaper than a copy (if your type has an expensive 
>> postblit).
>
> It can be constructed in-place.

Doesn't that depend on the ABI?


More information about the Digitalmars-d-learn mailing list