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

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; 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;

== 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,
    std::optional&lt;t&lowbar;RHS&lowbar;TYPE&gt; const& rhs);
----


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