std.boxer and arrays
Aarti_pl
aarti at interia.pl
Thu Oct 18 04:50:06 PDT 2007
> *Question 1*
> Converting variadic arguments to function:
>
> Below was possible to achieve with Box.
>
> # void func(...) {
> # Box[] barr = boxArray(_arguments, _argptr);
> # }
>
> As I see there is not such a possibility in new Variant. Or is it
> possible somehow? It's not question about making array of different
> values, but about converting variadic arguments to function into array
> of variants, what was possible with Box. Currently it seems that this
> (sometimes useful) functionality is missing from Variant.
>
> *Question 2*
> Possibility to assign variant type into variant.
> Once again example:
>
> # Variant a, b;
> # a = 5;
> # b = a;
> # writefln(b.type);
>
> the result is 'int', although I would like to get 'Variant'. Is it
> possible to achieve such a behavior, that I put Variant type into other
> Variant type? (So Variant will be 'boxed' in variant) With Box it was
> possible...
>
> (I thought that using explicitly opAssign on b will allow this, but it
> seems that it behaves exactly same way as normal assignment; it is very
> good IMHO, as it is at least consistent).
>
> BR
> Marcin
Brad, any chance to get some feedback?
BR
Marcin Kuszczak
(aarti_pl - www.zapytajmnie.com)
More information about the Digitalmars-d
mailing list