Optional.opAssign

Assigns a value to the optional or sets it to none.

If T is of class type, interface type, or some function pointer than passing in null sets the optional to none internally

  1. auto ref opAssign(None )
  2. auto ref opAssign(U lhs)
    struct Optional(T)
    ref
    opAssign
    (
    U : T
    )
    (
    auto ref U lhs
    )
    if (
    isMutable!T &&
    isAssignable!(T, U)
    )
  3. auto ref opAssign(Optional!U lhs)

Meta