In a C++ program with Boost, I am trying to build an unordered map whose keys are tuples of doubles:
typedef boost::tuples::tuple
Have you tried using this:
#include "boost/functional/hash.hpp"
#include
#include
using Edge = std::tuple;
struct KeyHash {
std::size_t operator()(const Edge & key) const {
return boost::hash_value(key);
}
};
using EdgeMap = std::unordered_map;
please notice I am using std
for tuple
and unordered_map
.
You can see full code with using even lambda on this Compiler Explorer link.