mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[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:
parent
88ab56a6e8
commit
d3cc3c2f27
2 changed files with 8 additions and 1 deletions
|
|
@ -64,6 +64,13 @@ namespace __gnu_cxx
|
||||||
size_t operator()(T * const &__x) const { return (size_t)__x; }
|
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
|
#else
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "9777"
|
#define REVISION_NR "9778"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue