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)
Definiert im Header <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 ;
(seit 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 ;
(seit C++11)
(bis C++20)

Vergleicht zwei Scoped-Allocator-Adapter. Zwei solche Allokatoren sind gleich, wenn:

  • lhs. outer_allocator ( ) == rhs. outer_allocator ( ) , und
  • falls sizeof... ( InnerAllocs ) > 0 , lhs. inner_allocator ( ) == rhs. inner_allocator ( ) .

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

(seit C++20)

Parameter

lhs, rhs - Scoped-Allocator-Adapter zum Vergleichen

Rückgabewert

1) Gibt true zurück, falls lhs und rhs gleich sind, andernfalls false .
2) Gibt true zurück, wenn lhs und rhs nicht gleich sind, false andernfalls.