hash_multimap::crend
Note
This API is obsolete. The alternative is unordered_multimap Class.
Returns a const iterator that addresses the location succeeding the last element in a reversed hash_multimap.
const_reverse_iterator crend( ) const;
Return Value
A const reverse bidirectional iterator that addresses the location succeeding the last element in a reversed hash_multimap Class (the location that had preceded the first element in the unreversed hash_multimap).
Remarks
crend is used with a reversed hash_multimap just as hash_multimap::end is used with a hash_multimap.
With the return value of crend, the hash_multimap object cannot be modified.
crend can be used to test to whether a reverse iterator has reached the end of its hash_multimap.
The value returned by crend 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_multimap_crend.cpp
// compile with: /EHsc
#include <hash_multimap>
#include <iostream>
int main( )
{
using namespace std;
using namespace stdext;
hash_multimap <int, int> hm1;
hash_multimap <int, int> :: const_reverse_iterator hm1_crIter;
typedef pair <int, int> Int_Pair;
hm1.insert ( Int_Pair ( 3, 30 ) );
hm1_crIter = hm1.crend( );
hm1_crIter--;
cout << "The last element of the reversed hash_multimap hm1 is "
<< hm1_crIter -> first << "." << endl;
}
The last element of the reversed hash_multimap hm1 is 3.
Requirements
Header: <hash_map>
Namespace: stdext