I have a struct which has a member of the type boost::heap:.pairing_heap. I my intention is to pass a comparision function (which can be member , but not necessary) for the pairing heap. How can I achieve that. I tried this.
I don't understand the error message. Everything seems fine to me.
struct B{
//some more fields: irrelevant here
bool compare_(std::pair<int,int>&, std::pair<int,int>&);
boost::heap::pairing_heap<std::pair<int,int>, boost::heap::compare<compare_> > in;
};
bool Block::compare_(std::pair<int,int>& c, std::pair<int,int>& d)
{
//returns true or false based on some criteria
}
error: type/value mismatch at argument 1 in template parameter list for ‘template<class T> struct boost::heap::compare’