Compartir a través de


hash_multiset::const_reference

Nota

Esta API está obsoleta.La alternativa es unordered_multiset (Clase).

Un tipo que proporciona una referencia a un elemento de const almacenados en un hash_multiset para leer y realizar operaciones de const .

typedef list<typename _Traits::value_type, typename _Traits::allocator_type>::const_reference const_reference;

Comentarios

En Visual C++ .NET 2003, los miembros de los archivos de encabezado <hash_map> y <hash_set> ya no están en el espacio de nombres std, sino que se han movido al espacio de nombres stdext. Vea El espacio de nombres stdext para obtener más información.

Ejemplo

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

int main( )
{
   using namespace std;
   using namespace stdext;
   hash_multiset <int> hms1;

   hms1.insert( 10 );
   hms1.insert( 20 );

   // Declare and initialize a const_reference &Ref1 
   // to the 1st element
   const int &Ref1 = *hms1.begin( );

   cout << "The first element in the hash_multiset is "
        << Ref1 << "." << endl;

   // The following line would cause an error because the 
   // const_reference cannot be used to modify the hash_multiset
   // Ref1 = Ref1 + 5;
}
  

Requisitos

Encabezado: <hash_set>

Espacio de nombres: stdext

Vea también

Referencia

hash_multiset (Clase)

Biblioteca de plantillas estándar