다음을 통해 공유


unordered_multimap::get_allocator

저장 된 할당 자가 개체를 가져옵니다.

Alloc get_allocator() const;

설명

멤버 함수 저장된 할당 기 개체를 반환합니다.

예제

 

// std_tr1__unordered_map__unordered_multimap_get_allocator.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>

네임 스페이스: 국방 표준

참고 항목

참조

<unordered_map>

unordered_multimap Class

기타 리소스

<unordered_map> 멤버