Boost logo

Boost Users :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-09-16 11:51:33


From: "someuserat" <marktutt_at_[hidden]>
>
> 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.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net