[#bsl-operator_gt-02]
= xref:bsl.adoc[bsl]::operator&gt;
:relfileprefix: ../
:mrdocs:

Greater&hyphen;than operators

== Synopses

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

Return `true` if the specified `lhs` `optional` object is ordered after the specified `rhs` `optional` object, and `false` otherwise&period; `lhs` is ordered after `rhs` if `lhs` is engaged and `rhs` is disengaged or if both are engaged and `lhs&period;value()` is ordered after `rhs&period;value()`&period; This function can be called in constant expressions only if neither `t&lowbar;LHS&lowbar;TYPE` nor `t&lowbar;RHS&lowbar;TYPE` is allocator&hyphen;aware&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_gt-0bc.adoc[operator&gt;](
    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_gt-0bc.adoc[_» more&period;&period;&period;_]#

Return `true` if the specified `lhs` `optional` object is ordered after the specified `rhs`, and `false` otherwise&period; `lhs` is ordered after `rhs` if `lhs` is engaged and `lhs&period;value()` is ordered after `rhs`&period; This function can be called in constant expressions only if `t&lowbar;LHS&lowbar;TYPE` is not allocator&hyphen;aware&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_gt-04.adoc[operator&gt;](
    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_gt-04.adoc[_» more&period;&period;&period;_]#

Return `true` if the specified `lhs` is ordered after the specified `rhs` `optional` object, and `false` otherwise&period; `lhs` is ordered after `rhs` if `rhs` is disengaged or `lhs` is ordered after `rhs&period;value()`&period; This function can be called in constant expressions only if `t&lowbar;RHS&lowbar;TYPE` is not allocator&hyphen;aware&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_gt-08.adoc[operator&gt;](
    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_gt-08.adoc[_» more&period;&period;&period;_]#

Return `true` if the specified `lhs` optional object is ordered after the specified `rhs` optional object, and `false` otherwise&period; `lhs` is ordered after `rhs` if `lhs` is engaged and `rhs` is disengaged or if both are engaged and `lhs&period;value()` is ordered after `rhs&period;value()`&period; Note that this function will fail to compile if `t&lowbar;LHS&lowbar;TYPE` and `t&lowbar;RHS&lowbar;TYPE` are not compatible&period; These functions can be called in constant expressions only if the `bsl&colon;&colon;optional`&apos;s value type is not allocator&hyphen;aware&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_gt-07.adoc[operator&gt;](
    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_gt-07.adoc[_» more&period;&period;&period;_]#

Compare a `std&colon;&colon;optional` with a `bsl&colon;&colon;optional` using greater&hyphen;than&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_gt-03.adoc[operator&gt;](
    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_gt-03.adoc[_» more&period;&period;&period;_]#

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


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

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

Return `true` if the value of the specified `lhs` stack is lexicographically greater than that of the specified `rhs` stack, and `false` otherwise&period; The value of stack `lhs` is lexicographically greater than that of stack `rhs` if `rhs` is lexicographically less than `lhs` (see `operator&lt;`)&period; This method requires that `operator&lt;`, inducing a total order, be defined for `value&lowbar;type`&period; Note that this operator returns `rhs &lt; lhs`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class VALUE,
    class CONTAINER&gt;
bool
xref:bsl/operator_gt-00.adoc[operator&gt;](
    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_gt-00.adoc[_» more&period;&period;&period;_]#

Return `true` if the index of the active alternative in the specified `lhs` is greater than that of the specified `rhs`, or if both have the same active alternative and the contained value of `lhs` compares greater than that of `rhs`, or if `rhs` is valueless by exception and `lhs` is not&semi; otherwise, return `false`&period; All alternatives shall support `operator&gt;`&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_gt-014.adoc[operator&gt;](
    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_gt-014.adoc[_» more&period;&period;&period;_]#

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


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

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

Return `true` if the value of the specified `lhs` queue is lexicographically greater than that of the specified `rhs` queue, and `false` otherwise&period; The value of queue `lhs` is lexicographically greater than that of queue `rhs` if `rhs` is lexicographically less than `lhs` (see `operator&lt;`)&period; This method requires that `operator&lt;`, inducing a total order, be defined for `value&lowbar;type`&period; Note that this operator returns `rhs &lt; lhs`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class VALUE,
    class CONTAINER&gt;
bool
xref:bsl/operator_gt-09.adoc[operator&gt;](
    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_gt-09.adoc[_» more&period;&period;&period;_]#

Return `true` if `&lowbar;&lowbar;x` is lexicographically greater than `&lowbar;&lowbar;y`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class &lowbar;Tp,
    class &lowbar;Alloc&gt;
bool
xref:bsl/operator_gt-0f.adoc[operator&gt;](
    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_gt-0f.adoc[_» more&period;&period;&period;_]#


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