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 set.
size_type max_size( ) const;
Return Value
The maximum possible length of the set.
Example
// 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;
}
Sample Output
The following output is for x86.
The maximum possible length of the set is 1073741823.
Requirements
Header: <set>
Namespace: std