"Christopher Wright" <[email protected]> wrote in message news:[email protected]... > 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; }
