Variant confusion
Jesse Phillips
jessek.phillips+D at gmail.m
Mon Mar 11 08:00:56 PDT 2013
On Monday, 11 March 2013 at 14:23:41 UTC, Peter Sommerfeld wrote:
> A confusing example:
> ----------------------------------------
> import std.stdio, std.variant, std.conv;
>
> alias Value = Variant;
> alias List = Value[];
> alias Map = List[Value];
Oh, the new alias syntax is in?
The problem you are seeing is that Variant can hold anything,
that incudes a map. But since Variant is just a struct it is a
different type from struct[struct] which is the type for map.
More information about the Digitalmars-d-learn
mailing list