unordered_multimap::const_local_iterator

更新 : 2007 年 11 月

被制御シーケンスの定数バケット反復子の型です。

typedef T5 const_local_iterator;

解説

この型は、バケットの定数前方反復子として使用できるオブジェクトを表します。ここでは、実装定義型 T5 のシノニムとして記述されています。

使用例

 

// std_tr1__unordered_map__unordered_multimap_const_local_iterator.cpp 
// compile with: /EHsc 
#include <unordered_map> 
#include <iostream> 
 
typedef std::tr1::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); 
    } 
 
 [c, 3] [b, 2] [a, 1]
 [a, 1]

必要条件

ヘッダー : <unordered_map>

名前空間 : std::tr1

参照

参照

<unordered_map>

unordered_multimap クラス

unordered_multimap::const_iterator

unordered_multimap::iterator

unordered_multimap::local_iterator