
4 Mar
2006
4 Mar
'06
1:42 p.m.
Delfin Rojas wrote:
yinglcs2@yahoo.com 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