hash_multiset::cend
Note
This API is obsolete. The alternative is unordered_multiset Class.
Returns a const iterator that addresses the location succeeding the last element in a hash_multiset.
const_iterator cend( ) const;
Return Value
A const bidirectional iterator that addresses the location succeeding the last element in a hash_multiset Class. If the hash_multiset is empty, then hash_multiset::cend == hash_multiset::begin.
Remarks
cend is used to test whether an iterator has reached the end of its hash_multiset. The value returned by cend should not be dereferenced.
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_multiset_cend.cpp
// compile with: /EHsc
#include <hash_multiset>
#include <iostream>
int main( )
{
using namespace std;
using namespace stdext;
hash_multiset <int> hs1;
hash_multiset <int> :: const_iterator hs1_cIter;
hs1.insert( 1 );
hs1.insert( 2 );
hs1.insert( 3 );
hs1_cIter = hs1.cend( );
hs1_cIter--;
cout << "The last element of hs1 is " << *hs1_cIter << endl;
}
The last element of hs1 is 3
Requirements
Header: <hash_set>
Namespace: stdext