bsl::operator<

Return whether lhs is lexicographically less than rhs.

Synopsis

Declared in <bslstl_stack.h>

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

Description

Return true if the value of the specified lhs stack is lexicographically less than that of the specified rhs stack, and false otherwise. Given iterators i and j over the respective sequences [lhs.begin() .. lhs.end())] and [rhs.begin() .. rhs.end())], the value of stack lhs is lexicographically less than that of stack rhs if true == *i < *j for the first pair of corresponding iterator positions where *i < *j and *j < *i are not both false. If no such corresponding iterator position exists, the value of lhs is lexicographically less than that of rhs if lhs.size() < rhs.size(). This method requires that operator<, inducing a total order, be defined for value_type.

Return Value

true if lhs is lexicographically less than rhs

Parameters

NameDescription
lhsleft-hand stack operand
rhsright-hand stack operand