I already did so, and I did again as you said. But I can't find the solution
for my problem. I can not do something like:
switch( _arguments.length ) {
case 0: call_sum( ); break;
case 1: call_sum( va_arg!(int)(_argptr)) ); break;
case 2: call_sum( va_arg!(int)(_argptr)), va_arg!(int)(_argptr)) ); break;
case 3: call_sum( va_arg!(int)(_argptr)), va_arg!(int)(_argptr)),
va_arg!(int)(_argptr)) ); break;
}
That would be too crazy as far that I don't even know the type of the arguments
that are passed. I just want to copy the current argument list of the current
called method to the next one.
call_sum( _arguments ); // would only pass ONE argument
call_sum( _argptr ); // would also only pass ONE argument
call_sum( ... ); // does not work
One solution surely would be to redesign the call_sum method to something like
void call_sum( void* argptr, uint argcnt ) {
/* ... */
}
But isn't it possible a diffent way?
Maybe this is a better example:
void debugln( ... ) {
// save argument data to file
// ...
// display message
writefln( ~arguments~ );
}
TomD Wrote:

The only way I have seen it done (in Tango), is to have a helper function
that does the real work which takes the vararg information as parameters.
For instance:
void real_calc_sum(TypeInfo[] arguments, ArgList args)
{ do the real calc sum here}
void calc_sum(...)
{
real_calc_sum(_arguments, _argptr);
}
Then you can call real_calc_sum from your calc function, and calc_sum is
callable outside calc as a variadic function.
-Steve