Boost logo

Boost Users :

From: Delfin Rojas (drojas_at_[hidden])
Date: 2005-02-18 14:09:06


Can somebody comment in this, please?

Thanks

-delfin

> -----Original Message-----
> From: boost-users-bounces_at_[hidden] [mailto:boost-users-
> bounces_at_[hidden]] On Behalf Of Delfin Rojas
> Sent: Wednesday, February 16, 2005 7:09 PM
> To: boost-users_at_[hidden]
> 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<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
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users


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