[#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 `lhs` and `rhs` are not equal&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 whether two hashtable iterators differ&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 `lhs` and `rhs` do not have the same value&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& lhs,
    xref:bsl/queue-0a5.adoc[queue&lt;VALUE2, CONTAINER2&gt;] const& rhs);
----

[.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] unused) noexcept;
----

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

Return whether the operands do not have the same value&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;_]#

Return whether two stacks have different values&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& lhs,
    xref:bsl/stack-05.adoc[stack&lt;VAL, CONT&gt;] const& rhs);
----

[.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 whether the operands do not have the same value&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 whether the operands do not have the same value&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 whether the operands do not have the same value&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 `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-006.adoc[operator!&equals;](
    xref:bsl/nullptr_t-08.adoc[nullptr&lowbar;t] unused,
    xref:bsl/function-0a.adoc[function&lt;PROTOTYPE&gt;] const& f) noexcept;
----

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

== Return Value

* `true` if `lhs` and `rhs` are not equal
* `true` if the hash multimaps do not contain the same elements
* `true` if the hash maps do not contain the same elements
* `true` if the lists differ, and `false` otherwise
* `true` if the hash multisets do not contain the same elements
* `true` if the hash sets do not contain the same elements
* `true` if the hash tables do not contain the same elements
* `true` if the iterators refer to different nodes
* `true` if the queues differ, otherwise `false`
* `true` if `f` is not empty, and `false` otherwise
* `true` if the stacks differ, `false` otherwise
* `true` if `lhs` and `rhs` do not have the same value, and `false` otherwise

== Parameters

[cols="1,4"]
|===
| Name| Description
| *lhs*
| variant to compare
| *rhs*
| variant to compare
| *&lowbar;&lowbar;hm1*
| first hash multimap
| *&lowbar;&lowbar;hm2*
| second hash multimap
| *&lowbar;&lowbar;x*
| left&hyphen;hand list
| *&lowbar;&lowbar;y*
| right&hyphen;hand list
| *f*
| function object to compare with null
| *unused*
| null pointer literal
|===


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