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まで)

二つのスコープ付きアロケータアダプタを比較します。以下の場合に二つのアロケータは等しいと見なされます:

  • lhs. outer_allocator ( ) == rhs. outer_allocator ( ) が成り立ち、かつ
  • sizeof... ( InnerAllocs ) > 0 の場合、 lhs. inner_allocator ( ) == rhs. inner_allocator ( ) が成り立つ。

!= 演算子は operator== から合成されます

(C++20以降)

パラメータ

lhs, rhs - 比較するスコープ付きアロケータアダプタ

戻り値

1) lhs rhs が等しい場合 true を返し、それ以外の場合 false を返します。
2) lhsとrhsが等しくない場合 true を返し、それ以外の場合 false を返します。