다음을 통해 공유


list::max_size

목록의 최대 길이 반환합니다.

size_type max_size( ) const;

반환 값

목록의 최대 허용 길이입니다.

예제

// list_max_size.cpp
// compile with: /EHsc
#include <list>
#include <iostream>

int main( ) 
{
   using namespace std;
   list <int> c1;
   list <int>::size_type i;

   i = c1.max_size( );
   cout << "Maximum possible length of the list is " << i << "." << endl;
}

샘플 출력

x86으로 다음 출력이 생성됩니다.

Maximum possible length of the list is 1073741823.

요구 사항

헤더: <목록>

네임스페이스: std

참고 항목

참조

list 클래스

표준 템플릿 라이브러리