What's wrong with std.variant.Variant?

user1234 user1234 at 12.de
Sat Jun 13 19:38:02 UTC 2020


On Saturday, 13 June 2020 at 19:10:04 UTC, Andrei Alexandrescu 
wrote:
> I was curious about collecting a list of grievances about 
> Variant. It's the oldest piece of generic code in std, and it 
> predates a lot of good language additions.
>
> So what's wrong with Variant? One thing I collected from a 
> coworker is that it doesn't work with Windows DLLs, because in 
> turn typeof() comparison does not work across Windows DLLs.
>
> What are other problems with it?

IIRC another is the use of typeid() instead of an enum to 
discriminate the store


More information about the Digitalmars-d mailing list