From 942e63d836658c37c112d733085aa9cdde406b03 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 30 May 2012 14:20:21 +0200 Subject: [PATCH] correctly implement std::hash --- src/string.hh | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/string.hh b/src/string.hh index 64ee9992..0a8c0abb 100644 --- a/src/string.hh +++ b/src/string.hh @@ -116,15 +116,14 @@ std::vector split(const String& str, Character separator); namespace std { -template<> - inline size_t - hash::operator()(const Kakoune::String& str) const - { return str.hash(); } - -template<> - inline size_t - hash::operator()(Kakoune::String str) const - { return str.hash(); } + template<> + struct hash + { + size_t operator()(const Kakoune::String& str) const + { + return str.hash(); + } + }; } #endif // string_hh_INCLUDED