mrdocs::operator<=>

Performs a three‐way comparison between two Optional values. If both are engaged, compares their contained values; otherwise, compares engagement state.

Synopsis

Declared in <mrdocs/ADT/Optional.hpp>

template<
    typename T,
    std::three_way_comparable_with<T> U>
[[nodiscard]]
constexpr
std::compare_three_way_result_t<T, U>
operator<=>(
    Optional<T> const& x,
    Optional<U> const& y);

Return Value

The result of the three‐way comparison between the optionals or their values.

Parameters

Name Description

x

The left operand

y

The right operand

Created with MrDocs