VALUE

template <typename T> pure bool empty(Optional<T> x);
template <typename T> pure const T &get(Optional<T> x);
template <typename... Ts> pure unsigned index(Union<Ts...> x);

template <typename T>
pure bool empty(Optional<T> x)

Test if an optional is empty.


template <typename T>
pure const T &get(Optional<T> x)

If an optional is non-empty, get its value.


template <typename... Ts>
pure unsigned index(Union<Ts...> x)

Get the index of the type of value stored in the union object.