February 12, 2013 Re: About ref used for performance reasons with struct | ||||
---|---|---|---|---|
| ||||
Posted in reply to Martin Nowak | 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 |
February 13, 2013 Re: About ref used for performance reasons with struct | ||||
---|---|---|---|---|
| ||||
Posted in reply to Martin Nowak | 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.
|
Copyright © 1999-2021 by the D Language Foundation