toNullable

Turns an Optional in to a Nullable

toNullable
(
T
)
(
auto ref Optional!T opt
)

Parameters

opt Optional!T

the optional to convert from a Nullable!T

Return Value

Type: auto

An Nullable!T

Examples

assert(some(3).toNullable == Nullable!int(3));
assert(no!int.toNullable == Nullable!int());

Meta