How to call other variadic function with the same arguments?
JN
666total at wp.pl
Sun Feb 24 14:30:32 UTC 2019
On Sunday, 24 February 2019 at 13:09:15 UTC, Victor Porton wrote:
> Let f be a variadic function:
>
> Result f(...);
>
> How to implement variadic function g which calls f with the
> same arguments as one it receives?
>
> Result g(...) {
> // ...
> }
void f(A...)(A a)
{
foreach(t; a)
writeln(t);
}
void g(A...)(A a)
{
f(a);
}
g(1, 2, 3);
More information about the Digitalmars-d-learn
mailing list