[#bsl-operator_le-06]
= xref:bsl.adoc[bsl]::operator&lt;&equals;
:relfileprefix: ../
:mrdocs:

Less&hyphen;than&hyphen;or&hyphen;equal operators

== Synopses

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

Return whether the left&hyphen;hand operand is before or equal to the right&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class t&lowbar;LHS&lowbar;TYPE,
    class t&lowbar;RHS&lowbar;TYPE&gt;
constexpr
bool
xref:bsl/operator_le-0c.adoc[operator&lt;&equals;](
    xref:bsl/optional-072.adoc[bsl::optional&lt;t&lowbar;LHS&lowbar;TYPE&gt;] const& lhs,
    xref:bsl/optional-072.adoc[bsl::optional&lt;t&lowbar;RHS&lowbar;TYPE&gt;] const& rhs);
----

[.small]#xref:bsl/operator_le-0c.adoc[_» more&period;&period;&period;_]#

Return whether the left&hyphen;hand operand is before or equal to the right&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class t&lowbar;LHS&lowbar;TYPE,
    class t&lowbar;RHS&lowbar;TYPE&gt;
constexpr
bool
xref:bsl/operator_le-03.adoc[operator&lt;&equals;](
    xref:bsl/optional-072.adoc[bsl::optional&lt;t&lowbar;LHS&lowbar;TYPE&gt;] const& lhs,
    t&lowbar;RHS&lowbar;TYPE const& rhs);
----

[.small]#xref:bsl/operator_le-03.adoc[_» more&period;&period;&period;_]#

Return whether the left&hyphen;hand operand is before or equal to the right&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class t&lowbar;LHS&lowbar;TYPE,
    class t&lowbar;RHS&lowbar;TYPE&gt;
constexpr
bool
xref:bsl/operator_le-01.adoc[operator&lt;&equals;](
    t&lowbar;LHS&lowbar;TYPE const& lhs,
    xref:bsl/optional-072.adoc[bsl::optional&lt;t&lowbar;RHS&lowbar;TYPE&gt;] const& rhs);
----

[.small]#xref:bsl/operator_le-01.adoc[_» more&period;&period;&period;_]#

Return whether the left&hyphen;hand operand is before or equal to the right&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class t&lowbar;LHS&lowbar;TYPE,
    class t&lowbar;RHS&lowbar;TYPE&gt;
constexpr
bool
xref:bsl/operator_le-04.adoc[operator&lt;&equals;](
    xref:bsl/optional-072.adoc[bsl::optional&lt;t&lowbar;LHS&lowbar;TYPE&gt;] const& lhs,
    std::optional&lt;t&lowbar;RHS&lowbar;TYPE&gt; const& rhs);
----

[.small]#xref:bsl/operator_le-04.adoc[_» more&period;&period;&period;_]#

Compare a `std&colon;&colon;optional` with a `bsl&colon;&colon;optional` using less&hyphen;than&hyphen;or&hyphen;equal&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class t&lowbar;LHS&lowbar;TYPE,
    class t&lowbar;RHS&lowbar;TYPE&gt;
constexpr
bool
xref:bsl/operator_le-0e3.adoc[operator&lt;&equals;](
    std::optional&lt;t&lowbar;LHS&lowbar;TYPE&gt; const& lhs,
    xref:bsl/optional-072.adoc[bsl::optional&lt;t&lowbar;RHS&lowbar;TYPE&gt;] const& rhs);
----

[.small]#xref:bsl/operator_le-0e3.adoc[_» more&period;&period;&period;_]#

Return whether the specified stacks compare lexicographically&semi; see the non&hyphen;member `operator&lt;&equals;` in the `bsl` namespace&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
xref:bsl/operator_le-0b.adoc[operator&lt;&equals;](
    xref:bsl/stack-05.adoc[stack&lt;VAL, CONT&gt;] const& lhs,
    xref:bsl/stack-05.adoc[stack&lt;VAL, CONT&gt;] const& rhs);
----

[.small]#xref:bsl/operator_le-0b.adoc[_» more&period;&period;&period;_]#

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


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class VALUE,
    class CONTAINER&gt;
bool
xref:bsl/operator_le-0ec.adoc[operator&lt;&equals;](
    xref:bsl/stack-05.adoc[stack&lt;VALUE, CONTAINER&gt;] const& lhs,
    xref:bsl/stack-05.adoc[stack&lt;VALUE, CONTAINER&gt;] const& rhs);
----

[.small]#xref:bsl/operator_le-0ec.adoc[_» more&period;&period;&period;_]#

Return `true` if `lhs` is less than or equal to `rhs`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class t&lowbar;HEAD,
    class&period;&period;&period; t&lowbar;TAIL&gt;
bool
xref:bsl/operator_le-00.adoc[operator&lt;&equals;](
    xref:bsl/variant.adoc[variant&lt;t&lowbar;HEAD, t&lowbar;TAIL&period;&period;&period;&gt;] const& lhs,
    xref:bsl/variant.adoc[variant&lt;t&lowbar;HEAD, t&lowbar;TAIL&period;&period;&period;&gt;] const& rhs);
----

[.small]#xref:bsl/operator_le-00.adoc[_» more&period;&period;&period;_]#

Return whether the specified queues compare lexicographically&semi; see the non&hyphen;member `operator&lt;&equals;` in the `bsl` namespace&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
xref:bsl/operator_le-05.adoc[operator&lt;&equals;](
    xref:bsl/queue-0a5.adoc[queue&lt;VALUE2, CONTAINER2&gt;] const& lhs,
    xref:bsl/queue-0a5.adoc[queue&lt;VALUE2, CONTAINER2&gt;] const& rhs);
----

[.small]#xref:bsl/operator_le-05.adoc[_» more&period;&period;&period;_]#

Return `true` if `lhs` is lexicographically less than or equal to `rhs`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class VALUE,
    class CONTAINER&gt;
bool
xref:bsl/operator_le-09.adoc[operator&lt;&equals;](
    xref:bsl/queue-0a5.adoc[queue&lt;VALUE, CONTAINER&gt;] const& lhs,
    xref:bsl/queue-0a5.adoc[queue&lt;VALUE, CONTAINER&gt;] const& rhs);
----

[.small]#xref:bsl/operator_le-09.adoc[_» more&period;&period;&period;_]#

Return whether `&lowbar;&lowbar;x` is lexicographically &lt;&equals; `&lowbar;&lowbar;y`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class &lowbar;Tp,
    class &lowbar;Alloc&gt;
bool
xref:bsl/operator_le-02.adoc[operator&lt;&equals;](
    xref:bsl/slist.adoc[slist&lt;&lowbar;Tp, &lowbar;Alloc&gt;] const& &lowbar;&lowbar;x,
    xref:bsl/slist.adoc[slist&lt;&lowbar;Tp, &lowbar;Alloc&gt;] const& &lowbar;&lowbar;y);
----

[.small]#xref:bsl/operator_le-02.adoc[_» more&period;&period;&period;_]#

== Return Value

* `true` if `lhs` is ordered before or equal to `rhs`, and `false` otherwise
* `true` if `lhs` is lexicographically less than or equal to `rhs`
* `true` if `lhs` is less than or equal to `rhs`
* `true` if `lhs` is lexicographically less than or equal to `rhs`, otherwise `false`
* `true` if `&lowbar;&lowbar;x &lt;&equals; &lowbar;&lowbar;y`, and `false` otherwise

== Parameters

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


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