The problem is that your keys are Node*
, but your hash and equality comparator are for const Node&
. You would need to use Node
keys, or write functors for Node*
:
std :: unordered_map <Node, int, hashing_func, key_equal_fn> nodemap;
or
class hashing_func
{
public:
unsigned long operator()(const Node* key) const
{
return = key->GetId();
}
};
etc.