Namensräume
Varianten
Aktionen

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

Von cppreference.com
 
 
Speicherverwaltungsbibliothek
(nur Exposition*)
Algorithmen für uninitialisierten Speicher
(C++17)
(C++17)
(C++17)
Beschränkte uninitialisierte
Speicher-Algorithmen
C-Bibliothek

Allocatoren
Speicherressourcen
Unterstützung für Garbage Collection
(C++11)(bis C++23)
(C++11)(bis C++23)
(C++11)(bis C++23)
(C++11)(bis C++23)
(C++11)(bis C++23)
(C++11)(bis C++23)
Uninitialisierter Speicher
Explizites Lebenszeitmanagement
 
 
Definiert in 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_adaptor`-Objekte. Zwei solche Allokatoren sind gleich, wenn

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

Der Operator != wird aus operator== synthetisiert.

(seit C++20)

[bearbeiten] Parameter

lhs, rhs - Zu vergleichende `scoped_allocator_adaptor`-Objekte.

[bearbeiten] Rückgabewert

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