Boost logo

Boost Users :

From: Jeff Flinn (TriumphSprint2000_at_[hidden])
Date: 2006-03-04 08:42:07


Delfin Rojas wrote:
>> yinglcs2_at_[hidden] wrote
>>
>> I have a vector of Rect. and I would like to copy those where
>> Rect::getX() equals to certain value.
...
> It seems what you want is copy_if. transform won't help in this case
> because it will execute the predicate on every element and assign its
> return value to the output iterator, try this (not tested):

Or the OP can use transform with filter_iterator form the iterator library.

See http://www.boost.org/libs/iterator/doc/filter_iterator.html

Jeff Flinn


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