flatten

Undocumented in source. Be warned that the author may not have intended to support it.
flatten
(
T
)
(
auto ref scope Optional!(Optional!T) optional
)

Examples

alias O = Optional!(Optional!int);
static assert(is(typeof(O.init.flatten()) == Optional!int));

assert(O.some(3.some).flatten() == 3.some);
assert(O.none.flatten() == none);

Meta