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)
Определено в заголовочном файле <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 ;
(начиная с 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 ;
(начиная с C++11)
(до C++20)

Сравнивает два адаптера scoped allocator. Два таких аллокатора равны, если:

  • lhs. outer_allocator ( ) == rhs. outer_allocator ( ) , и
  • если sizeof... ( InnerAllocs ) > 0 , lhs. inner_allocator ( ) == rhs. inner_allocator ( ) .

Оператор != синтезируется из operator== .

(since C++20)

Параметры

lhs, rhs - адаптеры scoped allocator для сравнения

Возвращаемое значение

1) Возвращает true если lhs и rhs равны, false в противном случае.
2) Возвращает true если lhs и rhs не равны, false в противном случае.