bsl::operator<=

Return whether the left-hand operand is before or equal to the right.

Synopsis

Declared in <bslstl_optional.h>

template<
    class t_LHS_TYPE,
    class t_RHS_TYPE>
constexpr
bool
operator<=(
    bsl::optional<t_LHS_TYPE> const& lhs,
    t_RHS_TYPE const& rhs);

Description

Return true if the specified lhs optional object is ordered before the specified rhs or lhs and rhs have the same value, and false otherwise. (See operator< and operator==.) This function can be called in constant expressions only if t_LHS_TYPE is not allocator-aware.

Return Value

true if lhs is ordered before or equal to rhs, and false otherwise

Parameters

NameDescription
lhsleft-hand operand
rhsright-hand operand