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!=.
template<
class t_HEAD,
class... t_TAIL>
bool
operator!=(
variant<t_HEAD, t_TAIL...> const& lhs,
variant<t_HEAD, t_TAIL...> const& rhs);
Return true if the specified hash multimaps do not contain the same elements.
template<
class _Key,
class _Tp,
class _HashFcn,
class _EqlKey,
class _Alloc>
bool
operator!=(
hash_multimap<_Key, _Tp, _HashFcn, _EqlKey, _Alloc> const& __hm1,
hash_multimap<_Key, _Tp, _HashFcn, _EqlKey, _Alloc> const& __hm2);
Return true if the specified hash maps do not contain the same elements.
template<
class _Key,
class _Tp,
class _HashFcn,
class _EqlKey,
class _Alloc>
bool
operator!=(
hash_map<_Key, _Tp, _HashFcn, _EqlKey, _Alloc> const& __hm1,
hash_map<_Key, _Tp, _HashFcn, _EqlKey, _Alloc> const& __hm2);
Return true if the specified lists do not contain the same elements.
template<
class _Tp,
class _Alloc>
bool
operator!=(
slist<_Tp, _Alloc> const& __x,
slist<_Tp, _Alloc> const& __y);
Return true if the specified hash multisets do not contain the same elements.
template<
class _Value,
class _HashFcn,
class _EqualKey,
class _Alloc>
bool
operator!=(
hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc> const& __hm1,
hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc> const& __hm2);
Return true if the specified hash sets do not contain the same elements.
template<
class _Value,
class _HashFcn,
class _EqualKey,
class _Alloc>
bool
operator!=(
hash_set<_Value, _HashFcn, _EqualKey, _Alloc> const& __hm1,
hash_set<_Value, _HashFcn, _EqualKey, _Alloc> const& __hm2);
Return true if the specified hash tables do not contain the same elements.
template<
class _Val,
class _Key,
class _HF,
class _ExK,
class _EqK,
class _All>
bool
operator!=(
hashtable<_Val, _Key, _HF, _ExK, _EqK, _All> const& __hm1,
hashtable<_Val, _Key, _HF, _ExK, _EqK, _All> const& __hm2);
Return true if the specified iterators refer to the same node.
template<
class _Val,
class _Key,
class _HF,
class _ExK,
class _EqK,
class _All>
bool
operator!=(
_Hashtable_iterator<_Val, _Key, _HF, _ExK, _EqK, _All> const& __x,
_Hashtable_iterator<_Val, _Key, _HF, _ExK, _EqK, _All> const& __y);
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}).
template<
class VALUE,
class CONTAINER>
bool
operator!=(
queue<VALUE, CONTAINER> const& lhs,
queue<VALUE, CONTAINER> const& rhs);
Return whether the specified queues do not have the same value; see the non‐member operator!= in the bsl namespace.
bool
operator!=(
queue<VALUE2, CONTAINER2> const&,
queue<VALUE2, CONTAINER2> const&);
Return true if the specified function is not empty.
template<class PROTOTYPE>
bool
operator!=(
function<PROTOTYPE> const& f,
nullptr_t) noexcept;
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}).
template<
class VALUE,
class CONTAINER>
bool
operator!=(
stack<VALUE, CONTAINER> const& lhs,
stack<VALUE, CONTAINER> const& rhs);
Same as the related overload above for operator!=.
bool
operator!=(
stack<VAL, CONT> const&,
stack<VAL, CONT> const&);
Compare a std::optional with a bsl::optional for inequality.
template<
class t_LHS_TYPE,
class t_RHS_TYPE>
constexpr
bool
operator!=(
std::optional<t_LHS_TYPE> const& lhs,
bsl::optional<t_RHS_TYPE> const& rhs);
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.
template<
class t_LHS_TYPE,
class t_RHS_TYPE>
constexpr
bool
operator!=(
bsl::optional<t_LHS_TYPE> const& lhs,
std::optional<t_RHS_TYPE> const& rhs);
Compare an optional object with a value for inequality.
template<
class t_LHS_TYPE,
class t_RHS_TYPE>
constexpr
bool
operator!=(
t_LHS_TYPE const& lhs,
bsl::optional<t_RHS_TYPE> const& rhs);
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.
template<
class t_LHS_TYPE,
class t_RHS_TYPE>
constexpr
bool
operator!=(
bsl::optional<t_LHS_TYPE> const& lhs,
t_RHS_TYPE const& rhs);
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.
template<
class t_LHS_TYPE,
class t_RHS_TYPE>
constexpr
bool
operator!=(
bsl::optional<t_LHS_TYPE> const& lhs,
bsl::optional<t_RHS_TYPE> const& rhs);
Return false if the function argument is empty, otherwise return true.
template<class PROTOTYPE>
bool
operator!=(
nullptr_t,
function<PROTOTYPE> const& f) noexcept;
Created with MrDocs