3 variant questions

Daniel Keep daniel.keep.lists at gmail.com
Tue May 12 02:36:10 PDT 2009



Saaa wrote:
>> Saaa wrote:
>>> ...
>>> Passing variadic arguments as ref I think is what I am asking for :)
>> You can't.  You have to explicitly take the address of the arguments.
>>
>>  -- Daniel
> 
> Like this ?
> *_argptr = 10;
> :D
> 
> I don't know how to tell the compiler I want to write data there.

import std.stdarg;

assert( _arguments[0] is typeid(int*) );
auto arg = va_arg!(int*)(_argptr);
*arg = 10;

Probably.

  -- Daniel


More information about the Digitalmars-d-learn mailing list