Variadic function parameters passed by move

Nordlöw via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Dec 21 14:59:32 PST 2016


On Wednesday, 21 December 2016 at 21:02:17 UTC, Ali Çehreli wrote:
> void f(Rs...)(Rs ranges)
> {
>     import std.functional: forward;
>     g(forward!ranges);

Interesting. How does this differ from 
std.algorithm.mutation.move() when R.length is 1?

Why do we have both `move` and `forward`, then?


More information about the Digitalmars-d-learn mailing list