다음을 통해 공유


map::max_size

맵의 최대 길이 반환합니다.

size_type max_size( ) const;

반환 값

지도 가능한 최대 길이입니다.

예제

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

샘플 출력

다음 출력에 대 한 x 86입니다.

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

요구 사항

헤더: <map>

네임 스페이스: std

참고 항목

참조

map Class

map::max_size, map::clear, map::erase, 및 map::size

표준 템플릿 라이브러리