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

Return whether the left&hyphen;hand operand is ordered after the right&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class t&lowbar;LHS&lowbar;TYPE,
    class t&lowbar;RHS&lowbar;TYPE&gt;
constexpr
bool
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);
----

== Description

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;

== Return Value

`true` if `lhs` is ordered after `rhs`, and `false` otherwise

== Parameters

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


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