Perform a three-way comparison of the operands.
Declared in <bslstl_optional.h>
template<class t_TYPE>
constexpr
std::strong_ordering
operator<=>(
bsl::optional<t_TYPE> const& value,
bsl::nullopt_t nullopt) noexcept;
Perform a three-way comparison of the specified value and nullopt; return the result of that comparison. This function can be called in constant expressions only if t_TYPE is not allocator-aware.
result of the three-way comparison
| Name | Description |
|---|---|
| value | value compared with or used to initialize the optional |
| nullopt | disengaged-optional tag; value is unused |