std::map<Key,T,Compare,Allocator>:: value_compare
|
class
value_compare
;
|
||
std::map::value_compare
は、
std::map::value_type
(キーと値のペア)型のオブジェクトを、ペアの最初の要素を比較することで比較する関数オブジェクトです。
目次 |
メンバー型
| 型 | 定義 |
result_type
(C++17で非推奨)
(C++20で削除)
|
bool |
first_argument_type
(C++17で非推奨)
(C++20で削除)
|
value_type
|
second_argument_type
(C++17で非推奨)
(C++20で削除)
|
value_type
|
|
これらのメンバ型は、公開継承によって std:: binary_function < value_type, value_type, bool > から取得されます。 |
(C++11まで) |
プロテクテッドメンバーオブジェクト
|
Compare
comp
|
格納された比較関数
(protected member object) |
メンバー関数
|
(constructor)
|
新しい
value_compare
オブジェクトを構築する
(protected member function) |
|
operator()
|
value_type
型の2つの値を比較する
(public member function) |
std::map<Key,T,Compare,Alloc>::value_compare:: value_compare
|
protected
:
value_compare ( Compare c ) ; |
||
内部の比較関数オブジェクトのインスタンスを c で初期化します。
パラメータ
| c | - | 割り当てる比較関数オブジェクト |
std::map<Key,T,Compare,Alloc>::value_compare:: operator()
|
bool
operator
(
)
(
const
value_type
&
lhs,
const
value_type
&
rhs
)
const
;
|
||
格納された比較関数を呼び出して lhs. first と rhs. first を比較します。
パラメータ
| lhs, rhs | - | 比較する値 |
戻り値
comp ( lhs. first , rhs. first )
例外
実装定義の例外をスローする可能性があります。