Namespaces
Variants

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

From cppreference.net
Memory management library
( exposition only* )
Allocators
Uninitialized memory algorithms
Constrained uninitialized memory algorithms
Memory resources
Uninitialized storage (until C++20)
( until C++20* )
( until C++20* )
( until C++20* )

Garbage collector support (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)
(C++11) (until C++23)
(1)
template < class T1, class T2 >
bool operator == ( const allocator < T1 > & lhs, const allocator < T2 > & rhs ) throw ( ) ;
(до C++11)
template < class T1, class T2 >
bool operator == ( const allocator < T1 > & lhs, const allocator < T2 > & rhs ) noexcept ;
(начиная с C++11)
(до C++20)
template < class T1, class T2 >

constexpr bool

operator == ( const allocator < T1 > & lhs, const allocator < T2 > & rhs ) noexcept ;
(начиная с C++20)
(2)
template < class T1, class T2 >
bool operator ! = ( const allocator < T1 > & lhs, const allocator < T2 > & rhs ) throw ( ) ;
(до C++11)
template < class T1, class T2 >
bool operator ! = ( const allocator < T1 > & lhs, const allocator < T2 > & rhs ) noexcept ;
(начиная с C++11)
(до C++20)

Сравнивает два аллокатора по умолчанию. Поскольку аллокаторы по умолчанию не имеют состояния, два аллокатора по умолчанию всегда равны.

1) Возвращает true .
2) Возвращает false .

Оператор != синтезируется из operator== .

(since C++20)

Параметры

lhs, rhs - стандартные аллокаторы для сравнения

Возвращаемое значение

1) true
2) false