set::max_size
Returns the maximum length of the set.
size_type max_size( ) const;
반환 값
The maximum possible length of the set.
예제
// set_max_size.cpp
// compile with: /EHsc
#include <set>
#include <iostream>
int main( )
{
using namespace std;
set <int> s1;
set <int>::size_type i;
i = s1.max_size( );
cout << "The maximum possible length "
<< "of the set is " << i << "." << endl;
}
샘플 출력
x86으로 다음 출력이 생성됩니다.
The maximum possible length of the set is 1073741823.
요구 사항
헤더: <설정>
네임스페이스: std