[#beman-optional-operator_3way-08] = xref:beman.adoc[beman]::xref:beman/optional.adoc[optional]::operator<=> :relfileprefix: ../../ :mrdocs: Three‐way comparison of an optional against a value. == Synopsis Declared in `<beman/optional/optional.hpp>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< typename T, typename U> requires (!is_derived_from_optional<U>) && 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& x, U const& v); ---- == Return Value The comparison category; a disengaged optional orders before `v.` == Parameters [cols="1,4"] |=== | Name| Description | *x* | The optional operand. | *v* | The value operand. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#