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

Inequality operators

== Synopses

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

Return `true` if the specified `lhs` and `rhs` have different active alternatives or only one holds an alternative, or if they have the same active alternative and the contained values compare unequal&semi; otherwise, return `false`&period; All alternatives shall support `operator!&equals;`&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_not_eq-023.adoc[operator!&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_not_eq-023.adoc[_» more&period;&period;&period;_]#

Return `true` if the specified hash multimaps do not contain the same elements&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class &lowbar;Key,
    class &lowbar;Tp,
    class &lowbar;HashFcn,
    class &lowbar;EqlKey,
    class &lowbar;Alloc&gt;
bool
xref:bsl/operator_not_eq-02b.adoc[operator!&equals;](
    xref:bsl/hash_multimap.adoc[hash&lowbar;multimap&lt;&lowbar;Key, &lowbar;Tp, &lowbar;HashFcn, &lowbar;EqlKey, &lowbar;Alloc&gt;] const& &lowbar;&lowbar;hm1,
    xref:bsl/hash_multimap.adoc[hash&lowbar;multimap&lt;&lowbar;Key, &lowbar;Tp, &lowbar;HashFcn, &lowbar;EqlKey, &lowbar;Alloc&gt;] const& &lowbar;&lowbar;hm2);
----

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

Return `true` if the specified hash maps do not contain the same elements&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class &lowbar;Key,
    class &lowbar;Tp,
    class &lowbar;HashFcn,
    class &lowbar;EqlKey,
    class &lowbar;Alloc&gt;
bool
xref:bsl/operator_not_eq-0f.adoc[operator!&equals;](
    xref:bsl/hash_map.adoc[hash&lowbar;map&lt;&lowbar;Key, &lowbar;Tp, &lowbar;HashFcn, &lowbar;EqlKey, &lowbar;Alloc&gt;] const& &lowbar;&lowbar;hm1,
    xref:bsl/hash_map.adoc[hash&lowbar;map&lt;&lowbar;Key, &lowbar;Tp, &lowbar;HashFcn, &lowbar;EqlKey, &lowbar;Alloc&gt;] const& &lowbar;&lowbar;hm2);
----

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

Return `true` if the specified lists do not contain the same elements&period;


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

Return `true` if the specified hash multisets do not contain the same elements&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class &lowbar;Value,
    class &lowbar;HashFcn,
    class &lowbar;EqualKey,
    class &lowbar;Alloc&gt;
bool
xref:bsl/operator_not_eq-001.adoc[operator!&equals;](
    xref:bsl/hash_multiset.adoc[hash&lowbar;multiset&lt;&lowbar;Value, &lowbar;HashFcn, &lowbar;EqualKey, &lowbar;Alloc&gt;] const& &lowbar;&lowbar;hm1,
    xref:bsl/hash_multiset.adoc[hash&lowbar;multiset&lt;&lowbar;Value, &lowbar;HashFcn, &lowbar;EqualKey, &lowbar;Alloc&gt;] const& &lowbar;&lowbar;hm2);
----

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

Return `true` if the specified hash sets do not contain the same elements&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class &lowbar;Value,
    class &lowbar;HashFcn,
    class &lowbar;EqualKey,
    class &lowbar;Alloc&gt;
bool
xref:bsl/operator_not_eq-090e.adoc[operator!&equals;](
    xref:bsl/hash_set.adoc[hash&lowbar;set&lt;&lowbar;Value, &lowbar;HashFcn, &lowbar;EqualKey, &lowbar;Alloc&gt;] const& &lowbar;&lowbar;hm1,
    xref:bsl/hash_set.adoc[hash&lowbar;set&lt;&lowbar;Value, &lowbar;HashFcn, &lowbar;EqualKey, &lowbar;Alloc&gt;] const& &lowbar;&lowbar;hm2);
----

[.small]#xref:bsl/operator_not_eq-090e.adoc[_» more&period;&period;&period;_]#

Return `true` if the specified hash tables do not contain the same elements&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class &lowbar;Val,
    class &lowbar;Key,
    class &lowbar;HF,
    class &lowbar;ExK,
    class &lowbar;EqK,
    class &lowbar;All&gt;
bool
xref:bsl/operator_not_eq-07e.adoc[operator!&equals;](
    xref:bsl/hashtable.adoc[hashtable&lt;&lowbar;Val, &lowbar;Key, &lowbar;HF, &lowbar;ExK, &lowbar;EqK, &lowbar;All&gt;] const& &lowbar;&lowbar;hm1,
    xref:bsl/hashtable.adoc[hashtable&lt;&lowbar;Val, &lowbar;Key, &lowbar;HF, &lowbar;ExK, &lowbar;EqK, &lowbar;All&gt;] const& &lowbar;&lowbar;hm2);
----

[.small]#xref:bsl/operator_not_eq-07e.adoc[_» more&period;&period;&period;_]#

Return `true` if the specified iterators refer to the same node&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class &lowbar;Val,
    class &lowbar;Key,
    class &lowbar;HF,
    class &lowbar;ExK,
    class &lowbar;EqK,
    class &lowbar;All&gt;
bool
xref:bsl/operator_not_eq-095.adoc[operator!&equals;](
    xref:bsl/_Hashtable_iterator.adoc[&lowbar;Hashtable&lowbar;iterator&lt;&lowbar;Val, &lowbar;Key, &lowbar;HF, &lowbar;ExK, &lowbar;EqK, &lowbar;All&gt;] const& &lowbar;&lowbar;x,
    xref:bsl/_Hashtable_iterator.adoc[&lowbar;Hashtable&lowbar;iterator&lt;&lowbar;Val, &lowbar;Key, &lowbar;HF, &lowbar;ExK, &lowbar;EqK, &lowbar;All&gt;] const& &lowbar;&lowbar;y);
----

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

Return `true` if the specified `lhs` and `rhs` objects do not have the same value, and `false` otherwise&period; Two `queue` objects `lhs` and `rhs` do not have the same value if they do not have the same number of elements, or some element in the ordered sequence of elements of `lhs` does not have the same value as the corresponding element in the ordered sequence of elements of `rhs`&period; This method requires that the (template parameter) type `VALUE` be `equality&hyphen;comparable` (see &lcub;Requirements on `VALUE`&rcub;)&period;


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

Return whether the specified queues do not have the same value&semi; see the non&hyphen;member `operator!&equals;` in the `bsl` namespace&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
xref:bsl/operator_not_eq-08a.adoc[operator!&equals;](
    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_not_eq-08a.adoc[_» more&period;&period;&period;_]#

Return `true` if the specified `function` is not empty&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class PROTOTYPE&gt;
bool
xref:bsl/operator_not_eq-0b.adoc[operator!&equals;](
    xref:bsl/function-0a.adoc[function&lt;PROTOTYPE&gt;] const& f,
    xref:bsl/nullptr_t-08.adoc[nullptr&lowbar;t]) noexcept;
----

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

Return `true` if the specified `lhs` and `rhs` objects do not have the same value, and `false` otherwise&period; Two `stack` objects `lhs` and `rhs` do not have the same value if they do not have the same number of elements, or some element in the ordered sequence of elements of `lhs` does not have the same value as the corresponding element in the ordered sequence of elements of `rhs`&period; This method requires that the (template parameter) type `VALUE` be `equality&hyphen;comparable` (see &lcub;Requirements on `VALUE`&rcub;)&period;


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

Same as the related overload above for `operator!&equals;`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
xref:bsl/operator_not_eq-03.adoc[operator!&equals;](
    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_not_eq-03.adoc[_» more&period;&period;&period;_]#

Compare a `std&colon;&colon;optional` with a `bsl&colon;&colon;optional` for inequality&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_not_eq-08d.adoc[operator!&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_not_eq-08d.adoc[_» more&period;&period;&period;_]#

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;


[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_not_eq-0cf.adoc[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]#xref:bsl/operator_not_eq-0cf.adoc[_» more&period;&period;&period;_]#

Compare an optional object with a value for inequality&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_not_eq-0a.adoc[operator!&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_not_eq-0a.adoc[_» more&period;&period;&period;_]#

Return `true` if the specified `lhs` and `rhs` objects do not have the same value, and `false` otherwise&period; An `optional` object and a value of some type do not have the same value if either the optional object is disengaged, or its underlying value does not compare equal to the other value&period; These function can be called in constant expressions only if the `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_not_eq-0e.adoc[operator!&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_not_eq-0e.adoc[_» more&period;&period;&period;_]#

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;


[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_not_eq-0c3.adoc[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);
----

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

Return false if the `function` argument is empty, otherwise return true&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class PROTOTYPE&gt;
bool
xref:bsl/operator_not_eq-006.adoc[operator!&equals;](
    xref:bsl/nullptr_t-08.adoc[nullptr&lowbar;t],
    xref:bsl/function-0a.adoc[function&lt;PROTOTYPE&gt;] const& f) noexcept;
----

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


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