Variadic function parameters passed by move
Nordlöw via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Dec 21 12:27:47 PST 2016
If I have a variadic function
f(Rs...)(Rs ranges)
{
g(ranges);
}
that calls
g(Rs...)(Rs ranges)
{
// use ranges
}
and all or some of the elements in `ranges` are non-copyable can
I somehow move them at the call of `g` inside of `f`.
I've tried
f(Rs...)(Rs ranges)
{
import std.algorithm.mutation : move;
g(move(ranges));
}
but that does't work.
More information about the Digitalmars-d-learn
mailing list