unordered_multimap::allocator_type

用于管理存储的分配器的类型。

typedef Alloc allocator_type;

备注

类型是的同义词。Alloc模板参数

示例

 

// std_tr1__unordered_map__unordered_multimap_allocator_type.cpp 
// compile with: /EHsc 
#include <unordered_map> 
#include <iostream> 
 
typedef std::unordered_multimap<char, int> Mymap; 
typedef std::allocator<std::pair<const char, int> > Myalloc; 
int main() 
    { 
    Mymap c1; 
 
    Mymap::allocator_type al = c1.get_allocator(); 
    std::cout << "al == std::allocator() is " 
        << std::boolalpha << (al == Myalloc()) << std::endl; 
 
    return (0); 
    } 
 
  

要求

标头: <unordered_map>

命名空间: std

请参见

参考

<unordered_map>

unordered_multimap 类

其他资源

unordered_map 成员