
11 Jul
2006
11 Jul
'06
1:59 p.m.
On 7/11/06, David Klein
you can use Boost.Lambda for this
#include
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