Udostępnij za pośrednictwem


map::max_size

Zwraca maksymalną długość mapy.

size_type max_size( ) const;

Wartość zwracana

Maksymalna długość możliwe mapy.

Przykład

// map_max_size.cpp
// compile with: /EHsc
#include <map>
#include <iostream>

int main( )
{
   using namespace std;
   map <int, int> m1;
   map <int, int> :: size_type i;

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

Przykładowe dane wyjściowe

Jest następujący wynik dla x 86.

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

Wymagania

Nagłówek: <map>

Obszar nazw: std

Zobacz też

Informacje

map Class

map::max_size, map::clear, map::erase, i map::size

Standardowa biblioteka szablonu