beman::optional::operator<=>

Three-way comparison of an optional against nullopt.

Synopsis

Declared in <beman/optional/optional.hpp>

template<class T>
constexpr
std::strong_ordering
operator<=>(
    optional<T> const& lhs,
    nullopt_t rhs) noexcept;

Return Value

equivalent if lhs is disengaged, otherwise greater.

Parameters

NameDescription
lhsThe optional to compare.
rhsThe nullopt operand.