Can somebody comment in this, please? Thanks -delfin
-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users- bounces@lists.boost.org] On Behalf Of Delfin Rojas Sent: Wednesday, February 16, 2005 7:09 PM To: boost-users@lists.boost.org Subject: [Boost-users] Boost lambda and shared_ptr
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
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
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users