On Friday, 6 May 2016 at 05:00:48 UTC, Erik Smith wrote:
Is there an existing way to adapt a parameter pack to an input range? I would like to construct an array with it. Example:

void run(A...) (A args) {
     Array!int a(toInputRange(args));
}

Use std.range.only: http://dlang.org/phobos/std_range.html#only

void run(A...)(A args) {
    auto rng = only(args);
    // ...
}

Reply via email to