The actual get function.
the type of the value being accessed.
Basic usage
SumType!(string, double) example1 = "hello"; SumType!(string, double) example2 = 3.14; assert(example1.get!string == "hello"); assert(example2.get!double == 3.14);
With type qualifiers
alias Example = SumType!(string, double); Example m = "mutable"; const(Example) c = "const"; immutable(Example) i = "immutable"; assert(m.get!string == "mutable"); assert(c.get!(const(string)) == "const"); assert(i.get!(immutable(string)) == "immutable");
Accesses a SumType's value.
The value must be of the specified type. Use has to check.