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

From cppreference.com
< cpp‎ | memory‎ | allocator
Memory management library
(exposition only*)
Uninitialized memory algorithms
(C++17)
(C++17)
(C++17)
(C++20)
Constrained uninitialized
memory algorithms
(C++20)
C Library

Allocators
(C++11)
(C++11)
Memory resources
Garbage collection support
(C++11)(until C++23)
(C++11)(until C++23)
(C++11)(until C++23)
(C++11)(until C++23)
(C++11)(until C++23)
(C++11)(until C++23)
Uninitialized storage
(until C++20*)
(until C++20*)
(until C++20*)
Explicit lifetime management
std::allocator
Member functions
(until C++20)
(until C++20)
(until C++20)
(until C++20)
Non-member functions
operator==operator!=
(until C++20)
(1)
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)
(until C++20)
template < class T1, class T2 >

constexpr bool

    operator== ( const allocator<T1> & lhs, const allocator<T2> & rhs ) noexcept ;
(since C++20)
(2)
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)
(until C++20)

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

1) Returns true.
2) Returns false.

The != operator is synthesized from operator==.

(since C++20)

Parameters

lhs, rhs - default allocators to compare

Return value

1) true
2) false