Udostępnij za pośrednictwem


hash_map::max_size

[!UWAGA]

Ten interfejs API jest nieaktualny.Alternatywą jest unordered_map — Klasa.

Zwraca maksymalną wartość wynoszącą hash_map.

size_type max_size( ) const;

Wartość zwracana

Maksymalna długość to możliwe hash_map.

Uwagi

W Visual C++ .NET 2003, elementy członkowskie plików nagłówka <hash_map> i <hash_set> nie są już w przestrzeni nazw std, ale raczej zostały przeniesione do przestrzeni nazw stdext.Zobacz Przestrzeń nazw stdext, aby uzyskać więcej informacji.

Przykład

// hash_map_max_size.cpp
// compile with: /EHsc
#include <hash_map>
#include <iostream>

int main( )
{
   using namespace std;
   using namespace stdext;
   hash_map <int, int> hm1;
   hash_map <int, int> :: size_type i;

   i = hm1.max_size( );   
   cout << "The maximum possible length "
        << "of the hash_map is " << i << "."
        << endl << "(Magnitude is machine specific.)";
}

Przykładowe dane wyjściowe

Poniższe dane wyjściowe odnoszą się do x86.

The maximum possible length of the hash_map is 536870911.
(Magnitude is machine specific.)

Wymagania

Nagłówek: <hash_map>

Przestrzeń nazw: stdext

Zobacz też

Informacje

hash_map — Klasa

Standardowa biblioteka szablonów