Boost logo

Boost :

From: Howard Hinnant (hinnant_at_[hidden])
Date: 2001-01-09 17:07:34


Dave Abrahams wrote on 1/9/2001 4:53 PM

>I just went through the SGI STL site looking for an algorithm fitting
>the following description:
>
> Given a sequence s, a predicate p, and an output iterator r,
>copies the elements e of s for which p(e) is true to the range
>beginning with r.
>
>I was surprised not to find it. Have I missed something obvious? Time
>for boost/algorithm.hpp?

std::remove_copy_if is very close. It copies if p(e) is false. I must
admit that will all the double negatives flying around in remove_copy_if,
copy_if seems a lot more readable.

-Howard


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk