On 2017-10-25 16:58, jmh530 wrote:

You're passing the function arguments as template parameters. Usually you want them to be able to be passed at run-time.

No problem:

$ cat main.d

import std.stdio;

void foo(args...)()
{
    writeln(args);
}

void main(string[] args)
{
    foo!(args);
}

$ dmd main.d
$ ./main foo bar
["./main", "foo", "bar"]

--
/Jacob Carlborg

Reply via email to