Access the stored error (undefined behavior if a value is held).

Synopses

Declared in <util/expected.h>

Access the stored error (undefined behavior if a value is held).

constexpr
E const&
error() const & noexcept;

Access the stored error (undefined behavior if a value is held).

constexpr
E&
error() & noexcept;

Access the stored error (undefined behavior if a value is held).

constexpr
E&&
error() && noexcept;

Return Value

  • A const reference to the stored error.

  • A reference to the stored error.

  • An rvalue reference to the stored error.

Created with MrDocs