Compartir a través de


unordered_multiset::get_allocator

Obtiene el objeto almacenado de asignador.

Alloc get_allocator() const;

Comentarios

La función miembro devuelve el objeto almacenado de asignador.

Ejemplo

 

// 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); 
    } 
 
  

Requisitos

Encabezado: <unordered_set>

Espacio de nombres: std

Vea también

Referencia

<unordered_set>

unordered_multiset (Clase)