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

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