Perform a three‐way comparison of the operands.
Synopsis
Declared in <bslstl_optional.h>
template<
class t_LHS,
three_way_comparable_with<t_LHS> t_RHS>
constexpr
compare_three_way_result_t<t_LHS, t_RHS>
operator<=>(
bsl::optional<t_LHS> const& lhs,
bsl::optional<t_RHS> const& rhs);
Description
Perform a three‐way comparison of the specified lhs and the specified rhs objects by using the comparison operators of t_LHS and t_RHS; return the result of that comparison. This function can be called in constant expressions only if neither t_LHS nor t_RHS is allocator‐aware.
Return Value
result of the three‐way comparison
Parameters
Name |
Description |
lhs |
left‐hand operand |
rhs |
right‐hand operand |
Created with MrDocs