i have code like this
priority_queue<int, std::vector<int>, decltype(&VD::CompareByDistance)> pqDistances(&VD::CompareByDistance);
where
class VD
{
...
bool CompareByDistance(int indexLeft, int indexRight) const;
};
But i get error
error C2064: term does not evaluate to a function taking 2 arguments
How can i pass class member as a compator, the thing is that i want comparator to access its instance fields. Thanks.