const ref parameters and r-value references

Timon Gehr via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun May 4 04:15:58 PDT 2014


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.


More information about the Digitalmars-d-learn mailing list