From: "someuserat"
If I can impose, I've got another question that I think is in the same area...
I couldn't think of a way to call Widget::operator()(const WidgetPtr w) through the smart pointer, so I wrote an equivalent method called equals to try to imlement the following function.
void WidgetMgr::dropWidget(const WidgetPtr w){
col.erase(remove_if(col.begin(),col.end(),boost::b ind2nd(boost::mem_fn(&Widget::equals),c))); }
... where Widget::equals takes a WidgetPtr? Based on this information, I think that you need boost::bind(&Widget::equals, _1, w) (Please use the boost-users list.)
Is there any reference to the boost libraries that goes into more detail? I've got several books on STL that never seem to address the issues I'm running into with smart pointers, I'm afraid what I may run into once I really get into the meat of this project.