Condividi tramite


hash_set::max_size

[!NOTA]

Questo API è obsoleto.L'alternativa consiste unordered_set Class.

Restituisce la lunghezza massima di hash_set.

size_type max_size( ) const;

Valore restituito

La lunghezza massima possibile di hash_set.

Note

In Visual C++ .NET 2003, i membri dei file di intestazione <hash_set> e <hash_map> non sono più nello spazio dei nomi di deviazione standard, ma sono stati spostati nello spazio dei nomi di stdext.Per ulteriori informazioni, vedere lo spazio dei nomi stdext.

Esempio

// 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;
}

Esempio di output

L'output seguente viene per x86.

The maximum possible length of the hash_set is 1073741823.

Requisiti

intestazione: <hash_set>

Stdext diSpazio dei nomi:

Vedere anche

Riferimenti

hash_set Class

Libreria di modelli standard