std.boxer vs Any

Aarti_pl aarti at interia.pl
Wed Oct 10 02:28:32 PDT 2007


Aarti_pl pisze:

> 1. It looks that opAssign is not very well suited for containers of this 
> type. The problem is that it disallows to put Variant into Variant (what 
> is sometimes very useful), as operator will not start work at all, but 
> just pointers to/values of containers will be replaced. Because of that 
> it is necessary to have free function, static opCall or use (ugly) 
> opAssign() function explicitly to achieve desired effect.

I would forget:

static opCall is also not good solution. It is not possible to 
explicitly assign concrete type when using static opCall. So it seems 
that the only reasonable solution is to use free function as in Box 
implementation....

Best Regards
Marcin Kuszczak
(aarti_pl - www.zapytajmnie.com)



More information about the Digitalmars-d mailing list