[#bsl-operator_lt-0c]
= xref:bsl.adoc[bsl]::operator&lt;
:relfileprefix: ../
:mrdocs:

Return whether `lhs` is lexicographically less than `rhs`&period;

== Synopsis

Declared in `&lt;bslstl&lowbar;stack&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class VALUE,
    class CONTAINER&gt;
bool
operator&lt;(
    xref:bsl/stack-05.adoc[stack&lt;VALUE, CONTAINER&gt;] const& lhs,
    xref:bsl/stack-05.adoc[stack&lt;VALUE, CONTAINER&gt;] 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&period; Given iterators `i` and `j` over the respective sequences `&lsqb;lhs&period;begin() &period;&period; lhs&period;end())&rsqb;` and `&lsqb;rhs&period;begin() &period;&period; rhs&period;end())&rsqb;`, the value of stack `lhs` is lexicographically less than that of stack `rhs` if `true &equals;&equals; &ast;i &lt; &ast;j` for the first pair of corresponding iterator positions where `&ast;i &lt; &ast;j` and `&ast;j &lt; &ast;i` are not both `false`&period; If no such corresponding iterator position exists, the value of `lhs` is lexicographically less than that of `rhs` if `lhs&period;size() &lt; rhs&period;size()`&period; This method requires that `operator&lt;`, inducing a total order, be defined for `value&lowbar;type`&period;

== Return Value

`true` if `lhs` is lexicographically less than `rhs`

== Parameters

[cols="1,4"]
|===
| Name| Description
| *lhs*
| left&hyphen;hand stack operand
| *rhs*
| right&hyphen;hand stack operand
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
