Passing _arguments into another variadic function
Adam D. Ruppe via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue Apr 12 07:26:43 PDT 2016
On Tuesday, 12 April 2016 at 09:08:06 UTC, Satoshi wrote:
> Is it possible to pass varargs to another function or must I do
> it by asm?
In C, you would make a version of the function that takes the
va_list type (see, for example, vprintf).
I believe in D, you'd want to do the same thing. Make another
version of your function, one does foo(...) and one does
foo(void* argptr, TypeInfo[] argtypes) and to forward the (...)
version to the other, you call foo(_argptr, _arguments), which
holds the real implementation.
More information about the Digitalmars-d-learn
mailing list