About ref used for performance reasons with struct

Martin Nowak code at dawg.eu
Tue Feb 12 15:49:04 PST 2013


On 02/13/2013 12:34 AM, Martin Nowak wrote:
> You can easily create a function that turns values into rvalues if it's
> opportune.

Actually there is also a nice template based implementation of this in 
phobos (std.algorithm.forward).
https://github.com/D-Programming-Language/phobos/blob/8bf6997acfdbe81442e4c3e4c3500b9197ffaaca/std/algorithm.d#L2002


More information about the Digitalmars-d mailing list