map::max_size

Gibt die maximale Länge der Zuordnung zurück.

size_type max_size( ) const;

Rückgabewert

Die maximal mögliche Länge der Zuordnung.

Beispiel

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

Beispielausgabe

Die folgende Ausgabe ist für x86.

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

Anforderungen

Header: <map>

Namespace: std

Siehe auch

Referenz

map Class

map::max_size, map::clear, map::erase, und map::size

Standardvorlagenbibliothek