Merge pull request #1729 from kkaefer/value_hash
Support boost::hash() for mapnik::value
This commit is contained in:
commit
86d8bf6b98
3 changed files with 15 additions and 0 deletions
|
@ -51,4 +51,10 @@ private:
|
|||
};
|
||||
}
|
||||
|
||||
namespace icu_50 {
|
||||
inline std::size_t hash_value(const UnicodeString& val) {
|
||||
return val.hashCode();
|
||||
}
|
||||
}
|
||||
|
||||
#endif // MAPNIK_UNICODE_HPP
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#include <boost/variant/variant.hpp>
|
||||
#include <boost/scoped_array.hpp>
|
||||
#include <boost/concept_check.hpp>
|
||||
#include <boost/functional/hash.hpp>
|
||||
|
||||
// stl
|
||||
#include <iostream>
|
||||
|
@ -905,6 +906,10 @@ operator << (std::basic_ostream<charT,traits>& out,
|
|||
return out;
|
||||
}
|
||||
|
||||
inline std::size_t hash_value(const value& val) {
|
||||
return hash_value(val.base());
|
||||
}
|
||||
|
||||
} // namespace value_adl_barrier
|
||||
|
||||
using value_adl_barrier::value;
|
||||
|
|
|
@ -78,6 +78,10 @@ struct value_null
|
|||
}
|
||||
};
|
||||
|
||||
inline std::size_t hash_value(const value_null& val) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
inline std::ostream& operator<< (std::ostream & out,value_null const& v)
|
||||
{
|
||||
return out;
|
||||
|
|
Loading…
Add table
Reference in a new issue