- When you define hash_value(), it is very important that the function is in the same namespace to that of key class.
- boost::tuple is in namespace boost::tuples. (Why!?!?)
So you have to include the following code:
typedef tuple param_tuple;
namespace boost {
namespace tuples {
std::size_t hash_value(param_tuple const& e) {
std::size_t seed = 0;
boost::hash_combine( seed, e.get<0>() );
boost::hash_combine( seed, e.get<1>() );
boost::hash_combine( seed, e.get<2>() );
return seed;
}
}
}
No comments:
Post a Comment