unordered_multimap::const_local_iterator
用於受控制序列的常數 bucket 迭代器類型。
typedef T5 const_local_iterator;
備註
型別描述可以當做常數正向 iterator Base Bucket 的物件。 它會說明此做為由實作環境決定型別 T5的同義字。
範例
// std_tr1__unordered_map__unordered_multimap_const_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::const_local_iterator lit = c1.begin(c1.bucket('a'));
std::cout << " [" << lit->first << ", " << lit->second << "]";
return (0);
}
需求
標頭: <unordered_map>
命名空間: std
請參閱
參考
unordered_multimap::const_iterator
unordered_multimap::local_iterator