hash_multiset::const_reference
[!POZNÁMKA]
Toto rozhraní API je zastaralé.Alternativou je unordered_multiset – třída.
Typ, který poskytuje odkaz na const prvků, které jsou uloženy v hash_multiset pro čtení a provádění const operace.
typedef list<typename _Traits::value_type, typename _Traits::allocator_type>::const_reference const_reference;
Poznámky
V aplikaci Visual C++ .NET 2003, členové hlavičkových souborů tříd <hash_map> a <hash_set> již nejsou v oboru názvů std, ale byly přesunuty do oboru názvů stdext.Další informace naleznete v tématu Obor názvů stdext.
Příklad
// 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;
}
Požadavky
Záhlaví:<hash_set>
Obor názvů: stdext