Why bug in boost? You should specialize std::hash template for boost::uuid
.
#include <boost/functional/hash.hpp>
namespace std
{
template<>
struct hash<boost::uuids::uuid>
{
size_t operator () (const boost::uuids::uuid& uid)
{
return boost::hash<boost::uuids::uuid>()(uid);
}
};
}
or, simply create unordered_map
with boost::hash
par
std::unordered_map<boost::uuids::uuid, T, boost::hash<boost::uuids::uuid>>
or provide hash
functor that satisfies requirements of std::hash
(thanks to Praetorian).