beman::optional::operator<=>

Three-way comparison of two optionals.

Synopsis

Declared in <beman/optional/optional.hpp>

template<
    typename T,
    std::three_way_comparable_with<T> U>
constexpr
std::compare_three_way_result_t<T, U>
operator<=>(
    optional<T> const& lhs,
    optional<U> const& rhs);

Return Value

The comparison category; a disengaged optional orders before any engaged one.

Parameters

NameDescription
lhsThe left-hand optional.
rhsThe right-hand optional.