Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Returns the maximum length of the map.
size_type max_size( ) const;
Return Value
The maximum possible length of the map.
Example
// 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.)";
}
Sample Output
The following output is for x86.
The maximum possible length of the map is 536870911.
(Magnitude is machine specific.)
Requirements
Header: <map>
Namespace: std
See Also
Reference
map::max_size, map::clear, map::erase, and map::size