[#bsl-operator_not_eq-06] = xref:bsl.adoc[bsl]::operator!= :relfileprefix: ../ :mrdocs: Inequality operators == Synopses Declared in `<bslstl_function.h>` 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; otherwise, return `false`. All alternatives shall support `operator!=`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class t_HEAD, class... t_TAIL> bool xref:bsl/operator_not_eq-023.adoc[operator!=]( xref:bsl/variant.adoc[variant<t_HEAD, t_TAIL...>] const& lhs, xref:bsl/variant.adoc[variant<t_HEAD, t_TAIL...>] const& rhs); ---- [.small]#xref:bsl/operator_not_eq-023.adoc[_» more..._]# Return `true` if the specified hash multimaps do not contain the same elements. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class _Key, class _Tp, class _HashFcn, class _EqlKey, class _Alloc> bool xref:bsl/operator_not_eq-02b.adoc[operator!=]( xref:bsl/hash_multimap.adoc[hash_multimap<_Key, _Tp, _HashFcn, _EqlKey, _Alloc>] const& __hm1, xref:bsl/hash_multimap.adoc[hash_multimap<_Key, _Tp, _HashFcn, _EqlKey, _Alloc>] const& __hm2); ---- [.small]#xref:bsl/operator_not_eq-02b.adoc[_» more..._]# Return `true` if the specified hash maps do not contain the same elements. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class _Key, class _Tp, class _HashFcn, class _EqlKey, class _Alloc> bool xref:bsl/operator_not_eq-0f.adoc[operator!=]( xref:bsl/hash_map.adoc[hash_map<_Key, _Tp, _HashFcn, _EqlKey, _Alloc>] const& __hm1, xref:bsl/hash_map.adoc[hash_map<_Key, _Tp, _HashFcn, _EqlKey, _Alloc>] const& __hm2); ---- [.small]#xref:bsl/operator_not_eq-0f.adoc[_» more..._]# Return `true` if the specified lists do not contain the same elements. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class _Tp, class _Alloc> bool xref:bsl/operator_not_eq-04.adoc[operator!=]( xref:bsl/slist.adoc[slist<_Tp, _Alloc>] const& __x, xref:bsl/slist.adoc[slist<_Tp, _Alloc>] const& __y); ---- [.small]#xref:bsl/operator_not_eq-04.adoc[_» more..._]# Return `true` if the specified hash multisets do not contain the same elements. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class _Value, class _HashFcn, class _EqualKey, class _Alloc> bool xref:bsl/operator_not_eq-001.adoc[operator!=]( xref:bsl/hash_multiset.adoc[hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc>] const& __hm1, xref:bsl/hash_multiset.adoc[hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc>] const& __hm2); ---- [.small]#xref:bsl/operator_not_eq-001.adoc[_» more..._]# Return `true` if the specified hash sets do not contain the same elements. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class _Value, class _HashFcn, class _EqualKey, class _Alloc> bool xref:bsl/operator_not_eq-090e.adoc[operator!=]( xref:bsl/hash_set.adoc[hash_set<_Value, _HashFcn, _EqualKey, _Alloc>] const& __hm1, xref:bsl/hash_set.adoc[hash_set<_Value, _HashFcn, _EqualKey, _Alloc>] const& __hm2); ---- [.small]#xref:bsl/operator_not_eq-090e.adoc[_» more..._]# Return `true` if the specified hash tables do not contain the same elements. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class _Val, class _Key, class _HF, class _ExK, class _EqK, class _All> bool xref:bsl/operator_not_eq-07e.adoc[operator!=]( xref:bsl/hashtable.adoc[hashtable<_Val, _Key, _HF, _ExK, _EqK, _All>] const& __hm1, xref:bsl/hashtable.adoc[hashtable<_Val, _Key, _HF, _ExK, _EqK, _All>] const& __hm2); ---- [.small]#xref:bsl/operator_not_eq-07e.adoc[_» more..._]# Return `true` if the specified iterators refer to the same node. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class _Val, class _Key, class _HF, class _ExK, class _EqK, class _All> bool xref:bsl/operator_not_eq-095.adoc[operator!=]( xref:bsl/_Hashtable_iterator.adoc[_Hashtable_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>] const& __x, xref:bsl/_Hashtable_iterator.adoc[_Hashtable_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>] const& __y); ---- [.small]#xref:bsl/operator_not_eq-095.adoc[_» more..._]# Return `true` if the specified `lhs` and `rhs` objects do not have the same value, and `false` otherwise. 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`. This method requires that the (template parameter) type `VALUE` be `equality‐comparable` (see {Requirements on `VALUE`}). [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class VALUE, class CONTAINER> bool xref:bsl/operator_not_eq-0900.adoc[operator!=]( xref:bsl/queue-0a5.adoc[queue<VALUE, CONTAINER>] const& lhs, xref:bsl/queue-0a5.adoc[queue<VALUE, CONTAINER>] const& rhs); ---- [.small]#xref:bsl/operator_not_eq-0900.adoc[_» more..._]# Return whether the specified queues do not have the same value; see the non‐member `operator!=` in the `bsl` namespace. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- bool xref:bsl/operator_not_eq-08a.adoc[operator!=]( xref:bsl/queue-0a5.adoc[queue<VALUE2, CONTAINER2>] const&, xref:bsl/queue-0a5.adoc[queue<VALUE2, CONTAINER2>] const&); ---- [.small]#xref:bsl/operator_not_eq-08a.adoc[_» more..._]# Return `true` if the specified `function` is not empty. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class PROTOTYPE> bool xref:bsl/operator_not_eq-0b.adoc[operator!=]( xref:bsl/function-0a.adoc[function<PROTOTYPE>] const& f, xref:bsl/nullptr_t-08.adoc[nullptr_t]) noexcept; ---- [.small]#xref:bsl/operator_not_eq-0b.adoc[_» more..._]# Return `true` if the specified `lhs` and `rhs` objects do not have the same value, and `false` otherwise. 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`. This method requires that the (template parameter) type `VALUE` be `equality‐comparable` (see {Requirements on `VALUE`}). [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class VALUE, class CONTAINER> bool xref:bsl/operator_not_eq-079.adoc[operator!=]( xref:bsl/stack-05.adoc[stack<VALUE, CONTAINER>] const& lhs, xref:bsl/stack-05.adoc[stack<VALUE, CONTAINER>] const& rhs); ---- [.small]#xref:bsl/operator_not_eq-079.adoc[_» more..._]# Same as the related overload above for `operator!=`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- bool xref:bsl/operator_not_eq-03.adoc[operator!=]( xref:bsl/stack-05.adoc[stack<VAL, CONT>] const&, xref:bsl/stack-05.adoc[stack<VAL, CONT>] const&); ---- [.small]#xref:bsl/operator_not_eq-03.adoc[_» more..._]# Compare a `std::optional` with a `bsl::optional` for inequality. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class t_LHS_TYPE, class t_RHS_TYPE> constexpr bool xref:bsl/operator_not_eq-08d.adoc[operator!=]( std::optional<t_LHS_TYPE> const& lhs, xref:bsl/optional-072.adoc[bsl::optional<t_RHS_TYPE>] const& rhs); ---- [.small]#xref:bsl/operator_not_eq-08d.adoc[_» more..._]# Return `true` if the specified `lhs` and `rhs` optional objects do not have the same value, and `false` otherwise. 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. Note that this function will fail to compile if `t_LHS_TYPE` and `t_RHS_TYPE` are not compatible. These functions can be called in constant expressions only if the `bsl::optional`'s value type is not allocator‐aware. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class t_LHS_TYPE, class t_RHS_TYPE> constexpr bool xref:bsl/operator_not_eq-0cf.adoc[operator!=]( xref:bsl/optional-072.adoc[bsl::optional<t_LHS_TYPE>] const& lhs, std::optional<t_RHS_TYPE> const& rhs); ---- [.small]#xref:bsl/operator_not_eq-0cf.adoc[_» more..._]# Compare an optional object with a value for inequality. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class t_LHS_TYPE, class t_RHS_TYPE> constexpr bool xref:bsl/operator_not_eq-0a.adoc[operator!=]( t_LHS_TYPE const& lhs, xref:bsl/optional-072.adoc[bsl::optional<t_RHS_TYPE>] const& rhs); ---- [.small]#xref:bsl/operator_not_eq-0a.adoc[_» more..._]# Return `true` if the specified `lhs` and `rhs` objects do not have the same value, and `false` otherwise. 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. These function can be called in constant expressions only if the `optional`'s value type is not allocator‐aware. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class t_LHS_TYPE, class t_RHS_TYPE> constexpr bool xref:bsl/operator_not_eq-0e.adoc[operator!=]( xref:bsl/optional-072.adoc[bsl::optional<t_LHS_TYPE>] const& lhs, t_RHS_TYPE const& rhs); ---- [.small]#xref:bsl/operator_not_eq-0e.adoc[_» more..._]# Return `true` if the specified `lhs` and `rhs` `optional` objects do not have the same value, and `false` otherwise. 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. This function can be called in constant expressions only if neither `t_LHS_TYPE` nor `t_RHS_TYPE` is allocator‐aware. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class t_LHS_TYPE, class t_RHS_TYPE> constexpr bool xref:bsl/operator_not_eq-0c3.adoc[operator!=]( xref:bsl/optional-072.adoc[bsl::optional<t_LHS_TYPE>] const& lhs, xref:bsl/optional-072.adoc[bsl::optional<t_RHS_TYPE>] const& rhs); ---- [.small]#xref:bsl/operator_not_eq-0c3.adoc[_» more..._]# Return false if the `function` argument is empty, otherwise return true. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class PROTOTYPE> bool xref:bsl/operator_not_eq-006.adoc[operator!=]( xref:bsl/nullptr_t-08.adoc[nullptr_t], xref:bsl/function-0a.adoc[function<PROTOTYPE>] const& f) noexcept; ---- [.small]#xref:bsl/operator_not_eq-006.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#