You can't expand a va_list
into separate arguments. The function you want to call have to be able to take a va_list
as argument. See e.g. printf
versus vprintf
.
Also, as noted by caf, you can't store a va_list
, as the arguments "pointed" to by it will not be valid once the lazy
function returns. Attempting to use the va_list
will lead to undefined behavior and all kinds of weirdness.