summaryrefslogtreecommitdiff
path: root/src/string.hh
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2012-05-30 14:20:21 +0200
committerMaxime Coste <frrrwww@gmail.com>2012-05-30 14:20:21 +0200
commit942e63d836658c37c112d733085aa9cdde406b03 (patch)
tree5b439813e15027a3f5b5ccfa11b7076e377ef82b /src/string.hh
parentd7c917c96ee50366a6f489f45d3873e0588a2d6a (diff)
correctly implement std::hash<String>
Diffstat (limited to 'src/string.hh')
-rw-r--r--src/string.hh17
1 files 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<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