Re: How to call other variadic function with the same arguments?

2019-02-24 Thread Paul Backus via Digitalmars-d-learn
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(...) { // ... } If you must use C-style variadic arguments, then your

Re: How to call other variadic function with the same arguments?

2019-02-24 Thread Bastiaan Veelo via Digitalmars-d-learn
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(...) { // ... } I don’t know if you can, but if at least g is a variadic

Re: How to call other variadic function with the same arguments?

2019-02-24 Thread JN via Digitalmars-d-learn
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)

How to call other variadic function with the same arguments?

2019-02-24 Thread Victor Porton via Digitalmars-d-learn
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(...) { // ... }