diff --git a/src/pugixml.hpp b/src/pugixml.hpp index 62052f6..3076e37 100644 --- a/src/pugixml.hpp +++ b/src/pugixml.hpp @@ -230,41 +230,8 @@ namespace pugi { return !(*this == r); } }; - - template > - struct basic_string_view_hash { - typedef basic_string_view argument_type; - typedef std::size_t result_type; - - template - result_type operator()(const std::basic_string& r) const { - return (*this)(argument_type(r.c_str(), r.size())); - } - - result_type operator()(const argument_type& r) const { - // Modified, from libstdc++ - // An implementation attempt at Fowler No Voll, 1a. - // Supposedly, used in MSVC, - // GCC (libstdc++) uses MurmurHash of some sort for 64-bit though...? - // But, well. Can't win them all, right? - // This should normally only apply when NOT using boost, - // so this should almost never be tapped into... - std::size_t hash = 0; - const unsigned char* cptr = reinterpret_cast(r.data()); - for (std::size_t sz = r.size(); sz != 0; --sz) { - hash ^= static_cast(*cptr++); - hash *= static_cast(1099511628211ULL); - } - return hash; - } - }; } // namespace pugi -namespace std { - template - struct hash > : pugi::basic_string_view_hash {}; -} // namespace std - namespace pugi { typedef basic_string_view string_view; typedef basic_string_view wstring_view;