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:
parent
d7c917c96e
commit
942e63d836
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user