다음을 통해 공유


hash_set::max_size

Note

This API is obsolete. The alternative is unordered_set Class.

Returns the maximum length of the hash_set.

size_type max_size( ) const;

Return Value

The maximum possible length of the hash_set.

Remarks

In Visual C++ .NET 2003, members of the <hash_map> and <hash_set> header files are no longer in the std namespace, but rather have been moved into the stdext namespace. See The stdext Namespace for more information.

Example

// hash_set_max_size.cpp
// compile with: /EHsc
#include <hash_set>
#include <iostream>

int main( )
{
   using namespace std;
   using namespace stdext;
   hash_set <int> hs1;
   hash_set <int>::size_type i;

   i = hs1.max_size( );
   cout << "The maximum possible length "
        << "of the hash_set is " << i << "." << endl;
}

Sample Output

The following output is for x86.

The maximum possible length of the hash_set is 1073741823.

Requirements

Header: <hash_set>

Namespace: stdext

See Also

Reference

hash_set Class

Standard Template Library