Three-way comparison of two optionals.
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);
The comparison category; a disengaged optional orders before any engaged one.
| Name | Description |
|---|---|
| lhs | The left-hand optional. |
| rhs | The right-hand optional. |