C++ reference
Basic types
TVariant
A container that can store objects of arbitrary types.
// declare variant typesusing MyVariantType = TVariant<int, float, FOtherType>; // can store ints, floats, and FOtherType instances
// createauto VariantVar = MyVariantType{TInPlaceType<FOtherType>(), FOtherType()};
// check typeVariantVar.IsType<FOtherType>();
// get the typed valueVariantVar.Get<FOtherType>(); // returns a reference to the contained value