Expected.this

Constructs an Expected with value or error based on the tye of the provided.

In case when T == E, it constructs Expected with value.

In case when T == void, it constructs Expected with error value.

Default constructor (if enabled) initializes Expected to T.init value. If T == void, it initializes Expected with no error.

  1. this(auto ref CT val)
    struct Expected(T, E = string, Hook = Abort)
    this
    ()
    (
    auto ref CT val
    )
    if (
    !is(E == void) &&
    (
    !is(T == void)
    )
    )
  2. this(auto ref E val, bool success)

Meta