On Thu, 23 Feb 2012 11:35:32 +0100, simendsjo <simend...@gmail.com> wrote:

Say i have a c function (didn't include first format argument for simplicity)

void print(...);
I wrap it up:
extern(System) void print(...);

And then I try to wrap it up in some safer D way:
void print(Args...)(Args args)
{
     print(args); // only the first argument is printed
}

void print(...)
{
     print(_argptr); // no go either
}

How am I supposed to do this? http://dlang.org/function.html#variadic doesn't make my any smarter.

My bad. The first version works just fine. I passed a float and had the format string as %d...

Reply via email to