Variant module

get_pointer

procedure · 1 overloadsince 0.29.0Source

A pointer to the T payload inside the variant, or null when another case is live. It stays valid until the variant is set again, freed or moved.

get_pointer :: (v: *$V/Variant, $T: Type) -> *T

A pointer to the T payload inside the variant, or null when another case is live. It stays valid until the variant is set again, freed or moved.

Parameters

v: *$V/Variant
$T: Type

Returns

*T

See also