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:

[code]
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) )
      g(*j);
}
[/code]

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

Thanks,
Justin Leonard