util::Expected::error

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;
» more...

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

constexpr
E&
error() & noexcept;
» more...

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

constexpr
E&&
error() && noexcept;
» more...

Return Value

  • A const reference to the stored error.
  • A reference to the stored error.
  • An rvalue reference to the stored error.