25 Jun
2014
25 Jun
'14
12:56 p.m.
2014-06-16 17:23 GMT+02:00 Liam White <inkscapebrony@...400...>:
There are some more of these in util/unordered-containers.h:
namespace std { template <> struct hashGlib::ustring : public std::unary_functionGlib::ustring, std::size_t { std::size_t operator()(Glib::ustring const &s) const { return hashstd::string()(s.raw()); } }; } // namespace std
And similar ones for boost and tr1 namespaces. These should also probably be removed.
No, these are necessary, because Glib::ustring does not have a default hash function defined in the standard library. We have to provide it ourselves. This template simply says that the standard hash function for the std::string object contained within Glib::ustring should be used.
Regards, Krzysztof