std::flat_multimap<Key,T,Compare,KeyContainer,MappedContainer>::value_compare
From cppreference.com
< cpp | コンテナ | flat_multimap
| class value_compare; |
(C++23から) | |
std::flat_multimap::value_compare は、格納されているキー/値への参照のペアである std::flat_multimap::const_reference 型のオブジェクトを、渡されたペアの最初の要素(すなわちキー)を比較することによって比較する関数オブジェクトです。
目次 |
[編集] メンバオブジェクト
| メンバ名 | 定義 |
comp (private) |
std::flat_multimap::key_compare 型の比較関数オブジェクト。(説明用のメンバオブジェクト*) |
[編集] メンバ関数
| (コンストラクタ) (private) |
value_compare オブジェクトを構築します。(public member function) |
| operator() |
value_type型の2つの値を比較する(public member function) |
std::flat_multimap<Key,T,Compare,KeyContainer,MappedContainer>::value_compare::value_compare
| private: value_compare( key_compare c ); |
(説明用*) | |
基になるコンパレータ comp のインスタンスを c に初期化します。
パラメータ
| c | - | 代入するコンパレータ。 |
std::flat_multimap<Key,T,Compare,KeyContainer,MappedContainer>::value_compare::operator()
| bool operator()( const const_reference& lhs, const const_reference& rhs ) const; |
||
格納されているコンパレータ comp を呼び出すことによって、lhs.first と rhs.first を比較します。
パラメータ
| lhs, rhs | - | 比較する値 |
戻り値
comp(lhs.first, rhs.first)
[編集] 例外
実装定義の例外をスローする場合があります。