名前空間
変種
操作

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

提供: cppreference.com
< cpp‎ | memory‎ | allocator
 
 
動的メモリ管理
スマートポインタ
(C++11)
(C++11)
(C++11)
(C++17未満)
(C++11)
アロケータ
メモリリソース
未初期化記憶域
ガベージコレクションサポート
その他
(C++20)
(C++11)
(C++11)
C のライブラリ
低水準のメモリ管理
 
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 を返します。

[編集] 引数

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

[編集] 戻り値

1) true
2) false