[#beman-optional-operator_3way-09] = xref:beman.adoc[beman]::xref:beman/optional.adoc[optional]::operator<=> :relfileprefix: ../../ :mrdocs: Three‐way comparison of two optionals. == Synopsis Declared in `<beman/optional/optional.hpp>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< typename T, std::three_way_comparable_with<T> U> constexpr std::compare_three_way_result_t<T, U> operator<=>( xref:beman/optional/optional-03.adoc[optional<T>] const& lhs, xref:beman/optional/optional-03.adoc[optional<U>] const& rhs); ---- == Return Value The comparison category; a disengaged optional orders before any engaged one. == Parameters [cols="1,4"] |=== | Name| Description | *lhs* | The left‐hand optional. | *rhs* | The right‐hand optional. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#