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
Name |
Description |
lhs |
The left‐hand optional. |
rhs |
The right‐hand optional. |
Created with MrDocs