[9778] Old gcc hash_map not have support for std::string keys.

In different from tr1 unordered_map

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
Lynx3d 2010-04-22 23:52:12 +04:00 committed by VladimirMangos
parent 88ab56a6e8
commit d3cc3c2f27
2 changed files with 8 additions and 1 deletions

View file

@ -64,6 +64,13 @@ namespace __gnu_cxx
size_t operator()(T * const &__x) const { return (size_t)__x; }
};
template<> struct hash<std::string>
{
size_t operator()(const std::string &__x) const
{
return hash<const char *>()(__x.c_str());
}
};
};
#else