Udostępnij za pośrednictwem


unordered_multiset::get_allocator

Zwraca obiekt alokatora przechowywane.

Alloc get_allocator() const;

Uwagi

Funkcja Członkowskich zwraca obiekt alokatora przechowywane.

Przykład

 

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

Wymagania

Nagłówek: <unordered_set>

Obszar nazw: std

Zobacz też

Informacje

<unordered_set>

unordered_multiset Class