Am Sun, 03 Aug 2014 09:17:57 -0700
schrieb Andrei Alexandrescu <seewebsiteforem...@erdani.org>:

> On 8/3/14, 8:51 AM, Johannes Pfau wrote:
> >
> > Variant uses TypeInfo internally, right?
> 
> No.
> 

https://github.com/D-Programming-Language/phobos/blob/master/std/variant.d#L210
https://github.com/D-Programming-Language/phobos/blob/master/std/variant.d#L371
https://github.com/D-Programming-Language/phobos/blob/master/std/variant.d#L696

Also the handler function concept will always have more overhead than a
simple tagged union. It is certainly useful if you want to store any
type, but if you only want a limited set of types there are more
efficient implementations.

Reply via email to