unordered_set::const_local_iterator
受控制序列的常數的值區 iterator 型別。
typedef T5 const_local_iterator;
備註
型別描述,以做為常數的正向 iterator,一桶的物件。描述實作定義的型別同義資料表視為T5。
範例
// std_tr1__unordered_set__unordered_set_const_local_iterator.cpp
// compile with: /EHsc
#include <unordered_set>
#include <iostream>
typedef std::unordered_set<char> Myset;
int main()
{
Myset c1;
c1.insert('a');
c1.insert('b');
c1.insert('c');
// display contents " [c] [b] [a]"
for (Myset::const_iterator it = c1.begin();
it != c1.end(); ++it)
std::cout << " [" << *it << "]";
std::cout << std::endl;
// inspect bucket containing 'a'
Myset::const_local_iterator lit = c1.begin(c1.bucket('a'));
std::cout << " [" << *lit << "]";
return (0);
}
需求
標頭: <unordered_set>
Namespace: 標準