22 General utilities library [utilities]
22.8.7 Partial specialization of expected for void types [expected.void]
constexpr explicit operator bool() const noexcept;
constexpr bool has_value() const noexcept;
constexpr void operator*() const noexcept;
Preconditions:
has_value() is
true. constexpr void value() const &;
Throws:
bad_expected_access(error()) if
has_value() is
false. constexpr void value() &&;
Throws:
bad_expected_access(std::move(error()))
if
has_value() is
false. constexpr const E& error() const & noexcept;
constexpr E& error() & noexcept;
Preconditions:
has_value() is
false. constexpr E&& error() && noexcept;
constexpr const E&& error() const && noexcept;
Preconditions:
has_value() is
false. Returns:
std::move(unex).