From 022c2f7255a48140f26d13d64a741cdf441ea8ab Mon Sep 17 00:00:00 2001 From: artemp Date: Thu, 18 Jun 2015 10:10:26 +0200 Subject: [PATCH] add std::hash specialization for mapnik::value --- include/mapnik/value.hpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/include/mapnik/value.hpp b/include/mapnik/value.hpp index 604dd8669..c4c37b446 100644 --- a/include/mapnik/value.hpp +++ b/include/mapnik/value.hpp @@ -990,4 +990,18 @@ inline bool value::is_null() const } // namespace mapnik +// support for std::unordered_xxx +namespace std +{ +template <> +struct hash +{ + size_t operator()(mapnik::value const& val) const + { + return mapnik::mapnik_hash_value(val); + } +}; + +} + #endif // MAPNIK_VALUE_HPP