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 ( ) ;
(bis C++11)
template < class T1, class T2 >
bool operator == ( const allocator < T1 > & lhs, const allocator < T2 > & rhs ) noexcept ;
(seit C++11)
(bis C++20)
template < class T1, class T2 >

constexpr bool

operator == ( const allocator < T1 > & lhs, const allocator < T2 > & rhs ) noexcept ;
(seit C++20)
(2)
template < class T1, class T2 >
bool operator ! = ( const allocator < T1 > & lhs, const allocator < T2 > & rhs ) throw ( ) ;
(bis C++11)
template < class T1, class T2 >
bool operator ! = ( const allocator < T1 > & lhs, const allocator < T2 > & rhs ) noexcept ;
(seit C++11)
(bis C++20)

Vergleicht zwei Standard-Allokatoren. Da Standard-Allokatoren zustandslos sind, sind zwei Standard-Allokatoren immer gleich.

1) Gibt true zurück.
2) Gibt false zurück.

Der != -Operator wird synthetisiert aus operator== .

(seit C++20)

Parameter

lhs, rhs - Standard-Allokatoren zum Vergleichen

Rückgabewert

1) true
2) false