Namespaces
Variants

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

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)
Défini dans l'en-tête <scoped_allocator>
template < class OuterAlloc1, class OuterAlloc2, class ... InnerAllocs >

bool operator == ( const scoped_allocator_adaptor < OuterAlloc1, InnerAllocs... > & lhs,

const scoped_allocator_adaptor < OuterAlloc2, InnerAllocs... > & rhs ) noexcept ;
(depuis C++11)
template < class OuterAlloc1, class OuterAlloc2, class ... InnerAllocs >

bool operator ! = ( const scoped_allocator_adaptor < OuterAlloc1, InnerAllocs... > & lhs,

const scoped_allocator_adaptor < OuterAlloc2, InnerAllocs... > & rhs ) noexcept ;
(depuis C++11)
(jusqu'à C++20)

Compare deux adaptateurs d'allocateur à portée. Deux de ces allocateurs sont égaux si :

  • lhs. outer_allocator ( ) == rhs. outer_allocator ( ) , et
  • si sizeof... ( InnerAllocs ) > 0 , lhs. inner_allocator ( ) == rhs. inner_allocator ( ) .

L'opérateur != est synthétisé à partir de operator== .

(depuis C++20)

Paramètres

lhs, rhs - adaptateurs d'allocateur à portée à comparer

Valeur de retour

1) Retourne true si lhs et rhs sont égaux, false sinon.
2) Retourne true si lhs et rhs ne sont pas égaux, false sinon.