Remarque
L’accès à cette page nécessite une autorisation. Vous pouvez essayer de vous connecter ou de modifier des répertoires.
L’accès à cette page nécessite une autorisation. Vous pouvez essayer de modifier des répertoires.
obtient l'objet d'allocation stocké.
Alloc get_allocator() const;
Notes
La fonction membre retourne l'objet d'allocation stocké.
Exemple
// std_tr1__unordered_map__unordered_map_get_allocator.cpp
// compile with: /EHsc
#include <unordered_map>
#include <iostream>
typedef std::unordered_map<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);
}
Configuration requise
en-tête : <unordered_map>
l'espace de noms : type