About ref used for performance reasons with struct

Namespace rswhite4 at googlemail.com
Wed Feb 13 02:17:03 PST 2013


On Tuesday, 12 February 2013 at 23:49:04 UTC, Martin Nowak wrote:
> 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

But that does not solve the problem. And it's not pleasant to use.


More information about the Digitalmars-d mailing list