or

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

Examples

auto a = Optional!int.some(3);
auto b = Optional!int.none();
assert(a.or(b) is a);
assert(b.or(a) is a);

a = Optional!int.none();
b = Optional!int.none();
assert(a.or(b) is b);

a = Optional!int.some(3);
b = Optional!int.some(10);
assert(a.or(b) is a);

Meta