match

Calls an appropriate handler depending on if the optional has a value or not

template match(handlers...)
ref
match
(
T
)
(
inout auto ref Optional!T opt
)
if (
handlers.length == 2
)

Members

Functions

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

Parameters

opt

The optional to call match on

handlers

2 predicates, one that takes the underlying optional type and another that names nothing

Meta