Boost logo

Boost Users :

Subject: [Boost-users] [Boost.Range] Filter adaptor
From: Justin Leonard (justinleona_at_[hidden])
Date: 2010-07-22 18:12:31

I think I'm missing something obvious - but here goes.
I'm trying to rewrite the a loop similar to the following using

boost::range_iterator<Doubles>::type i = boost::begin(first_range);
boost::range_iterator<Doubles>::type j = boost::begin(second_range);

for( ; i != boost::end(first_range) && j != boost::end(second_range);
++i,++j) {
   if( f(*i) )

Is there something similar to:
for_each( filtered( second_range,first_range,f ) , g );
to use in place of the above?

Justin Leonard

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at