Less‐than operators

Synopses

Declared in <bslstl_optional.h>

Return true if the specified lhs iterator is earlier in the underlying sequence than the specified rhs iterator, and false otherwise.

Return whether the left‐hand operand is ordered before the right.

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

Return whether the left‐hand operand is ordered before the right.

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

Return whether the left‐hand operand is ordered before the right.

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

Return whether the left‐hand operand is ordered before the right.

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

Compare a std::optional with a bsl::optional using less‐than.

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

Return whether the specified stacks compare lexicographically; see the non‐member operator< in the bsl namespace.

bool
operator<(
    stack<VAL, CONT> const& lhs,
    stack<VAL, CONT> const& rhs);

Return whether lhs is lexicographically less than rhs.

template<
    class VALUE,
    class CONTAINER>
bool
operator<(
    stack<VALUE, CONTAINER> const& lhs,
    stack<VALUE, CONTAINER> const& rhs);

Return true if lhs is less than rhs.

template<
    class t_HEAD,
    class... t_TAIL>
bool
operator<(
    variant<t_HEAD, t_TAIL...> const& lhs,
    variant<t_HEAD, t_TAIL...> const& rhs);

Return whether the specified queues compare lexicographically; see the non‐member operator< in the bsl namespace.

Return true if lhs is lexicographically less than rhs.

template<
    class VALUE,
    class CONTAINER>
bool
operator<(
    queue<VALUE, CONTAINER> const& lhs,
    queue<VALUE, CONTAINER> const& rhs);

Return true if __x is lexicographically less than __y.

template<
    class _Tp,
    class _Alloc>
bool
operator<(
    slist<_Tp, _Alloc> const& __x,
    slist<_Tp, _Alloc> const& __y);

Return Value

  • true if lhs precedes rhs in the underlying sequence

  • true if lhs is ordered before rhs, and false otherwise

  • true if lhs is lexicographically less than rhs

  • true if lhs is less than rhs

  • true if lhs is lexicographically less than rhs, otherwise false

  • true if lhs is lexicographically less than rhs, otherwise false

  • true if __x < __y, and false otherwise

Parameters

Name

Description

lhs

left‐hand operand

rhs

right‐hand operand

__x

left‐hand list

__y

right‐hand list

Created with MrDocs