17 Feb
2005
17 Feb
'05
3:09 a.m.
Hi all, I would like to know if there is a way right now or if there is a plan to add the possibility of using bll::bind (boost lambda bind) with shared_ptr as one uses it with normal pointers. This functionality is currently supported by boost::bind but I cannot find a way to make it work with lambda bind. For example: class CFoo { public: void SetI(const int & nI) { ... } }; std::vector<CFoo*> vpFoos; std::vector< boost::shared_ptr<CFoo> > vpFoos2; //Assume I initialize the vectors std::for_each(vpFoos.begin(),vpFoos.end(), boost::lambda::bind(&CFoo::SetI, boost::lambda::_1, 5)); //Works great //I _cannot_ find to make this work with vpFoos2; I _can_ make it work with boost::bind. Thanks -delfin