Result.value

auto value()()

Returns the success payload.

The payload is returned by value: a reference into the stored alternative could dangle after the active alternative is replaced or outlive a temporary Result, and D cannot express lifetime rules that would make reference returns provably safe here.

Calling value() while the error alternative is active is a programming error and terminates the process (see the module documentation).

Returns

A copy of the success payload, retaining transitive qualifiers.

Referenced data is not automatically deep-copied.

Throws

Any exception thrown by the payload's copy operation.
auto value()() const

Ditto.