hash< std::string > Struct Template Reference

Here's some useful code for dealing with the fact that the STL doesn't supply hash function for std::string class. More...

#include <hash_map_gnu_cxx.h>

List of all members.

Public Member Functions

size_t operator() (const std::string &x) const
 Return the hash value.


Detailed Description

template<>
struct hash< std::string >

Here's some useful code for dealing with the fact that the STL doesn't supply hash function for std::string class.

This is rather unfortunate, but here's the code for it, borrowed from

http://forums.devshed.com/c-programming-42/tip-about-stl-hash-map-and-string-55093.html

I'm putting it here since I can't find anywhere else that this would be more suited. Hash function for string


The documentation for this struct was generated from the following file:

Send suggestions, questions, and feedback to WEINBERG at ASTRO dot UMASS dot EDU.
Documentation generated at Fri Mar 26 00:35:12 2010 by doxygen