![]() |
---|
此 API 已过时。另一种方法是 unordered_multimap Class。 |
返回 hash_multimap 的最大长度。
size_type max_size( ) const;
返回值
hash_multimap 的最大可能的长度。
备注
在 Visual C++ .NET 2003 中,<hash_map> 和 <hash_set> 标头文件的成员中不再标准,命名空间,而是将 stdext 命名空间。有关更多信息,请参见 stdext 命名空间。
示例
// hash_multimap_max_size.cpp
// compile with: /EHsc
#include <hash_map>
#include <iostream>
int main( )
{
using namespace std;
using namespace stdext;
hash_multimap <int, int> hm1;
hash_multimap <int, int> :: size_type i;
i = hm1.max_size( );
cout << "The maximum possible length "
<< "of the hash_multimap is " << i << "." << endl;
}
示例输出
下面的输出是针对 x86。
The maximum possible length of the hash_multimap is 536870911.
要求
标头: <hash_map>
命名空间: stdext