operator==,!=(std::allocator)

From cppreference.com
< cpp‎ | memory‎ | allocator
 
 
Dynamic memory management
Uninitialized storage
(C++17)
Garbage collection support
Miscellaneous
(C++20)
(C++11)
(C++11)
C Library
Low level memory management
 
std::allocator
Member functions
(until C++20)
(until C++20)
(until C++20)
Non-member functions
operator==operator!=
 
template< class T1, class T2 >
bool operator==( const allocator<T1>& lhs, const allocator<T2>& rhs ) throw();
(until C++11)
template< class T1, class T2 >
bool operator==( const allocator<T1>& lhs, const allocator<T2>& rhs ) noexcept;
(since C++11)
template< class T1, class T2 >
bool operator!=( const allocator<T1>& lhs, const allocator<T2>& rhs ) throw();
(until C++11)
template< class T1, class T2 >
bool operator!=( const allocator<T1>& lhs, const allocator<T2>& rhs ) noexcept;
(since C++11)

Compares two default allocators. Since default allocators are stateless, two default allocators are always equal.

1) Returns true
2) Returns false

Parameters

lhs, rhs - default allocators to compare

Return value

1) true
2) false