std::map
提供: cppreference.com
![]() |
このページは、Google 翻訳を使って英語版から機械翻訳されました。
翻訳には誤りや奇妙な言い回しがあるかもしれません。文章の上にポインタをおくと、元の文章が見れます。誤りを修正して翻訳を改善する手助けをしてください。翻訳についての説明は、ここをクリックしてください。 |
Defined in header <map>
|
||
template< class Key, |
||
std::map
はユニークなキーによるキー-バリューペアを格納するソート済みの連想コンテナです。キーは比較関数Compare
によってソートされます。検索、削除、および挿入操作の計算量は対数オーダーです。マップは通常赤黒木として実装されています.
std::map
はContainer
、AllocatorAwareContainer
、AssociativeContainer
とReversibleContainer
の要件を満たします
目次 |
[編集] メンバータイプ
メンバー·タイプ
Original: Member type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Definition |
key_type
|
Key
|
mapped_type
|
T
|
value_type
|
std::pair<const Key, T> |
size_type
|
符号なし整数型(通常size_t)
Original: Unsigned integral type (usually size_t) The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
difference_type
|
Signed integer type (usually ptrdiff_t) |
key_compare
|
Compare
|
allocator_type
|
Allocator
|
reference
|
Allocator::reference (C++11以前)value_type& (C++11およびそれ以降)
|
const_reference
|
Allocator::const_reference (C++11以前)const value_type& (C++11およびそれ以降)
|
pointer
|
Allocator::pointer (C++11以前)std::allocator_traits<Allocator>::pointer (C++11およびそれ以降) |
const_pointer
|
Allocator::const_pointer (C++11以前) std::allocator_traits<Allocator>::const_pointer (C++11およびそれ以降) |
iterator
|
BidirectionalIterator
|
const_iterator
|
定数双方向イテレータ
Original: Constant bidirectional iterator The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
reverse_iterator
|
std::reverse_iterator<iterator> |
const_reverse_iterator
|
std::reverse_iterator<const_iterator> |
[編集] メンバークラス
タイプ value_type のオブジェクトを比較しますOriginal: compares objects of type value_type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラス) |
[編集] メンバ関数
map を構築します Original: constructs the map The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
destructs the map (パブリックメンバ関数) | |
コンテナに値を割り当てます Original: assigns values to the container The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
関連したアロケータを返す Original: returns the associated allocator The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
要素へのアクセス | |
(C++11) |
指定された要素にアクセスします。境界チェックを行います。 (パブリックメンバ関数) |
指定された要素にアクセスします Original: access specified element The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
イテレータ | |
先頭を指すイテレータを返します (パブリックメンバ関数) | |
末尾を指すイテレータを返す Original: returns an iterator to the end The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
逆イテレータの先頭を返します (パブリックメンバ関数) | |
逆イテレータの末尾を返します (パブリックメンバ関数) | |
容量 | |
コンテナが空であるかどうかをチェックします (パブリックメンバ関数) | |
要素数を返します Original: returns the number of elements The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
要素の最大数を返します Original: returns the maximum possible number of elements The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
修正 | |
全ての要素を削除します (パブリックメンバ関数) | |
要素を挿入します (パブリックメンバ関数) | |
(C++11) |
constructs element in-place (パブリックメンバ関数) |
(C++11) |
ヒントを使用してその場で要素を構成します Original: constructs elements in-place using a hint The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) |
要素を消去します (パブリックメンバ関数) | |
コンテナの内容をスワップします (パブリックメンバ関数) | |
検索 | |
特定のキーと一致する要素の数を返します Original: returns the number of elements matching specific key The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
特定のキーを持つ要素を検索します Original: finds element with specific key The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
特定のキーと一致する要素の範囲を返します Original: returns range of elements matching a specific key The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
指定した要素より 小さくない 最初の要素を指すイテレータを返す (パブリックメンバ関数) | |
指定した要素より 大きい 最初の要素を指すイテレータを返す (パブリックメンバ関数) | |
オブザーバー | |
キーを比較する関数を返します Original: returns the function that compares keys The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
タイプVALUE_TYPEのオブジェクト内のキーを比較する関数を返します Original: returns the function that compares keys in objects of type value_type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) |
[編集] 非メンバ関数
辞書的にmap内の値を比較します Original: lexicographically compares the values in the map The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (関数テンプレート) | |
特殊化されたstd::swapアルゴリズム (関数テンプレート) |