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

From cppreference.com
Memory management library
(exposition only*)
Uninitialized memory algorithms
(C++17)
(C++17)
(C++17)
(C++20)
Constrained uninitialized
memory algorithms
(C++20)
C Library

Allocators
(C++11)
(C++11)
Memory resources
Garbage collection support
(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)
Uninitialized storage
(until C++20*)
(until C++20*)
(until C++20*)
Explicit lifetime management
Defined 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 ;
(since 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 ;
(since C++11)
(until C++20)

Compares two scoped allocator adaptors. Two such allocators are equal if:

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

The != operator is synthesized from operator==.

(since C++20)

Parameters

lhs, rhs - scoped allocator adaptors to compare

Return value

1) Returns true if lhs and rhs are equal, false
2) Returns true if lhs and rhs are not equal, false