not able to access member function frooperator overload function

I have a structure defined in class which has a operator overload function. And I have a hashmap defined. I am trying to access the hashmap variable from the operator overload function and I get following error:
error: invalid use of nonstatic data member ‘vigil::applications::Routing_module::weight_map’

declaration in routing.hh :
struct ridhash {

std::size_t operator()(const RouteId& rid) const;
};

struct rideq {
bool operator()(const RouteId& a, const RouteId& b) const;
};

struct routehash {

std::size_t operator()(const RoutePtr& rte) const;
};

struct routeq {
bool operator()(const RoutePtr& a, const RoutePtr& b) const;
};

struct ruleptrcmp {
bool operator()(const RoutePtr& a, const RoutePtr& b) const;
};

typedef hash_map<RoutePtr, int, routehash, routeq> WeightMap;
WeightMap weight_map;

std::size_t
Routing_module::routehash::operator()(const RoutePtr& rte) const
{

return (ridhash()(rte->id)
^ HASH_NAMESPACE::hash<uint32_t>()(weight_map.find(rte)->second));

}



Topic archived. No new replies allowed.