[#bsl-operator_not_eq-0c3]
= xref:bsl.adoc[bsl]::operator!&equals;
:relfileprefix: ../
:mrdocs:

Return whether the operands do not have the same value&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!&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);
----

== Description

Return `true` if the specified `lhs` and `rhs` `optional` objects do not have the same value, and `false` otherwise&period; Two `optional` objects do not have the same value if one is disengaged and the other is engaged, or if both are engaged and the values of their underlying objects do not compare equal&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;

== Return Value

`true` if `lhs` and `rhs` do not have the same value, 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]#
