Boost logo

Boost Users :

Subject: Re: [Boost-users] Using vectors of ptrs
From: Robert Jones (robertgbjones_at_[hidden])
Date: 2009-07-17 09:17:16


On Fri, Jul 17, 2009 at 1:47 PM, Roman Perepelitsa <
roman.perepelitsa_at_[hidden]> wrote:

>
> std::for_each(v.begin(), v.end(), boost::mem_fn(&A::a));
>
>
Thanks Roman - I've missed a trick there!

Is that also equivalent to

for_each( v.begin(), v.end(), boost::bind(&A::a, _1));

?

Thanks.

-- 
ACCU - Professionalism in programming - http://www.accu.org


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