VariantN.get

inout(T) get(T)() @property inout

Returns the value stored in the VariantN object, either by specifying the needed type or the index in the list of allowed types. The latter overload only applies to bounded variants (e.g. Algebraic).

Parameters

TThe requested type. The currently stored value must implicitly convert to the requested type, in fact DecayStaticToDynamicArray!T. If an implicit conversion is not possible, throws a VariantException.
indexThe index of the type among AllowedTypesParam, zero-based.
@property auto get(uint index)() if (index < AllowedTypes.length) inout

Ditto