Condividi tramite


map::max_size

Restituisce la lunghezza massima di mapping.

size_type max_size( ) const;

Valore restituito

La lunghezza massima possibile eseguire il mapping.

Esempio

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

Esempio di output

L'output seguente viene per x86.

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

Requisiti

intestazione: <map>

Spazio dei nomi: deviazione standard

Vedere anche

Riferimenti

map Class

map::max_size, map::clear, map::erase, e map::size

Libreria di modelli standard