Boost logo

Boost Users :

From: David Klein (d.klein_at_[hidden])
Date: 2006-07-11 10:09:12


boost-users-bounces_at_[hidden] wrote:
> On 7/11/06, David Klein <d.klein_at_[hidden]> wrote:
>> you can use Boost.Lambda for this
>>
>> #include <boost/lambda/lambda.hpp>
>>
>> using namespace boost::lambda;
>>
>> std::vector<int> v;
>> ...
>> v.erase(std::remove_if(v.begin(), v.end(), 5 == _1));
>>
> Shouldn't it be
> v.erase( std::remove_if(v.begin(), v.end(), 5 == _1), v.end()
> ); as you want to erase the range, not just the single element?
>
> ~ SWMc
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users

<blush>
of course, my bad (... actually i blame the heat in our office ;) )
</>

--
dave

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