1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
// unordered_multimap::hash_function
#include <iostream>
#include <string>
#include <unordered_map>
typedef std::unordered_multimap<std::string,std::string> stringmap;
int main ()
{
stringmap myumm;
stringmap::hasher fn = myumm.hash_function();
std::cout << "this: " << fn ("this") << std::endl;
std::cout << "thin: " << fn ("thin") << std::endl;
return 0;
}
| |