unordered_multimap::local_iterator
填色 iterator 型別。
typedef T4 local_iterator;
備註
型別描述,以做為轉寄的 iterator 填色的物件。描述實作定義的型別同義資料表視為T4。
範例
// std_tr1__unordered_map__unordered_multimap_local_iterator.cpp
// compile with: /EHsc
#include <unordered_map>
#include <iostream>
typedef std::unordered_multimap<char, int> Mymap;
int main()
{
Mymap c1;
c1.insert(Mymap::value_type('a', 1));
c1.insert(Mymap::value_type('b', 2));
c1.insert(Mymap::value_type('c', 3));
// display contents " [c 3] [b 2] [a 1]"
for (Mymap::const_iterator it = c1.begin();
it != c1.end(); ++it)
std::cout << " [" << it->first << ", " << it->second << "]";
std::cout << std::endl;
// inspect bucket containing 'a'
Mymap::local_iterator lit = c1.begin(c1.bucket('a'));
std::cout << " [" << lit->first << ", " << lit->second << "]";
return (0);
}
需求
標頭: <unordered_map>
Namespace: 標準
請參閱
參考
unordered_multimap::const_iterator
unordered_multimap::const_local_iterator