mrdocs::operator<=>

Performs a three‐way comparison between an Optional and a value. If the Optional is engaged, compares its value to v; otherwise, returns less.

Synopsis

Declared in <mrdocs/ADT/Optional.hpp>

template<
    typename T,
    typename U>
requires (!detail::isDerivedFromOptional<U>)
        && requires { typename std::compare_three_way_result_t<T, U>; }
        && std::three_way_comparable_with<T, U>
constexpr
std::compare_three_way_result_t<T, U>
operator<=>(
    Optional<T> const& x,
    U const& v);

Return Value

The result of the three‐way comparison with the value.

Parameters

Name Description

x

The left operand

v

The right operand

Created with MrDocs