1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-11-27 02:23:26 +03:00

correctly implement std::hash<String>

This commit is contained in:
Maxime Coste 2012-05-30 14:20:21 +02:00
parent d7c917c96e
commit 942e63d836

View File

@ -116,15 +116,14 @@ std::vector<String> split(const String& str, Character separator);
namespace std
{
template<>
inline size_t
hash<const Kakoune::String&>::operator()(const Kakoune::String& str) const
{ return str.hash(); }
template<>
inline size_t
hash<Kakoune::String>::operator()(Kakoune::String str) const
{ return str.hash(); }
template<>
struct hash<Kakoune::String>
{
size_t operator()(const Kakoune::String& str) const
{
return str.hash();
}
};
}
#endif // string_hh_INCLUDED