Aracılığıyla paylaş


unordered_set::get_allocator

Saklı ayırıcı nesnesini alır.

Alloc get_allocator() const;

Notlar

Üye işlevi, saklı ayırıcı nesnesini döndürür.

Örnek

 

// std_tr1__unordered_set__unordered_set_get_allocator.cpp 
// compile with: /EHsc 
#include <unordered_set> 
#include <iostream> 
 
typedef std::unordered_set<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); 
    } 
 
  

Gereksinimler

Başlık: <unordered_set>

Namespace: std

Ayrıca bkz.

Başvuru

<unordered_set>

unordered_set Class

Diğer Kaynaklar

<unordered_set> Üyeler