va_arg<T> method
Retrieves the next argument in the va_list of the specified type T.
Implementation
T va_arg<T>(va_list ap) {
if (ap._index >= ap._args.length) {
throw StateError('va_arg: no more arguments available in va_list');
}
return ap._args[ap._index++] as T;
}