3 variant questions
Saaa
empty at needmail.com
Mon May 11 04:20:56 PDT 2009
"Christopher Wright" <dhasenan at gmail.com> wrote in message
news:gu8v1b$1uth$1 at digitalmars.com...
> Saaa wrote:
>> How do I return a variant type in D1?
>> After assessing that a variadic argument is an array, how do I check its
>> depth?
>> How do I set the variable given to me through the _arguments array?
>> thanks :)
>
> Variant func()
> {
> return variant(5);
> }
I can't seem to find Variant in D1
>
> If you want to return something given from a runtime variadic argument
> list, neither Tango's Variant nor Phobos's Variant will work. Tango's
:(
> Variant will get this capability soon, I hear.
>
> There is also reflect.variant:
> svn co http://felt-project.org/reflect
>
> reflect.variant allows you to create a Variant from a void* and a
> TypeInfo, like you get with varargs.
Shouldn't it be possible to set an variadic argument?
void func( ... )
{
//something like this
cast(int) _argptr = 10;
}
More information about the Digitalmars-d-learn
mailing list