December 30
import core.vararg;

string foo(fmt, ...) {
    int args_len = _arguments.length;
    if (args_len == 1) {
        if (typeid(_arguments[0] == typeid(TypeInfo[]))) {
            _arguments = va_arg!(TypeInfo[])(_argptr);
            args_len = _arguments.length;

            // how can I adjust _argptr?
            _argptr = ???
        }
    }

    // using _arguments and va_arg!(X)(_argptr) here

    return "not implemented";
}

void writef(string fmt, ...) {
    // write(foo(fmt, ...)); // <-- doesn't work

    // _arguments gets passed as a single argument of type TypeInfo[]
    write(foo(fmt, _arguments));
}


https://dlang.org/spec/function.html#d_style_variadic_functions

December 30
On Saturday, 30 December 2017 at 10:14:35 UTC, tipdbmp wrote:
>
>             // how can I adjust _argptr?
>             _argptr = ???

Try this:
  _argptr = *cast(va_list*)_argptr;