|
Boost Users : |
Subject: Re: [Boost-users] [Unknown] Pedicate wrappers around std algorithms
From: Neil Groves (neil_at_[hidden])
Date: 2009-06-04 11:07:16
Hi!
On Thu, Jun 4, 2009 at 9:25 AM, Robert Jones <robertgbjones_at_[hidden]>wrote:
> Hi All,
>
> Does this kind of wrapper exist in Boost anywhere?
>
> template < class Iterator, class T >
> bool exists( Iterator begin, Iterator end, const T & value )
> {
> return find( begin, end, value ) != end;
> }
>
In "boost/detail/algorithm.hpp" there is a function called
container_contains that does exactly this albeit with different spelling. In
addition there are some excellent wrappers around predicates in the
"boost/algorithm/string/predicate.hpp"
>
> Thanks,
>
> - Rob.
>
>
I hope this helps,
Neil Groves
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