The actual has function.
the type to check for.
Basic usage
SumType!(string, double) example = "hello"; assert( example.has!string); assert(!example.has!double); // If T isn't part of the SumType, has!T will always return false assert(!example.has!int);
With type qualifiers
alias Example = SumType!(string, double); Example m = "mutable"; const Example c = "const"; immutable Example i = "immutable"; assert( m.has!string); assert(!m.has!(const(string))); assert(!m.has!(immutable(string))); assert(!c.has!string); assert( c.has!(const(string))); assert(!c.has!(immutable(string))); assert(!i.has!string); assert(!i.has!(const(string))); assert( i.has!(immutable(string)));
Checks whether a SumType contains a value of a given type.
The types must match exactly, without implicit conversions.