名前空間
変種
操作

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

From cppreference.com
< cpp‎ | memory‎ | allocator
 
 
メモリ管理ライブラリ
(説明用*)
未初期化メモリのアルゴリズム
(C++17)
(C++17)
(C++17)
制約付き未初期化
メモリアルゴリズム
Cライブラリ

アロケータ
メモリリソース
ガベージコレクションのサポート
(C++11)(C++23まで)
(C++11)(C++23まで)
(C++11)(C++23まで)
(C++11)(C++23まで)
(C++11)(C++23まで)
(C++11)(C++23まで)
未初期化ストレージ
(C++20まで*)
(C++20まで*)
明示的な生存期間管理
 
std::allocator
メンバ関数
(C++20まで)
(C++20まで)
(C++20まで)
非メンバ関数
operator==operator!=
(C++20まで)
 
(1)
template< class T1, class T2 >
bool operator==( const allocator<T1>& lhs, const allocator<T2>& rhs ) throw();
(C++11まで)
template< class T1, class T2 >
bool operator==( const allocator<T1>& lhs, const allocator<T2>& rhs ) noexcept;
(C++11以降)
(C++20まで)
template< class T1, class T2 >

constexpr bool

    operator==( const allocator<T1>& lhs, const allocator<T2>& rhs ) noexcept;
(C++20以降)
(2)
template< class T1, class T2 >
bool operator!=( const allocator<T1>& lhs, const allocator<T2>& rhs ) throw();
(C++11まで)
template< class T1, class T2 >
bool operator!=( const allocator<T1>& lhs, const allocator<T2>& rhs ) noexcept;
(C++11以降)
(C++20まで)

デフォルトのアロケータを2つ比較します。デフォルトのアロケータはステートレスであるため、2つのデフォルトアロケータは常に等しいとみなされます。

1) true を返します。
2) false を返します。

!= 演算子は operator== から合成される。

(C++20以降)

[編集] パラメータ

lhs, rhs - 比較するデフォルトアロケータ

[編集] 戻り値

1) true
2) false
English 日本語 中文(简体) 中文(繁體)