orElse

Returns the value contained within the optional _or else_ another value if there's no!T

  1. U orElse(Optional!T opt, U value)
    ref
    U
    orElse
    (
    T
    U
    )
    (
    inout auto ref Optional!T opt
    ,
    lazy U value
    )
    if (
    is(U : T)
    )
  2. auto ref orElse(Optional!T opt)

Parameters

opt Optional!T

the optional to call orElse on

value U

The value to return if the optional is empty

Meta