Hi!

On Thu, Jun 4, 2009 at 9:25 AM, Robert Jones <robertgbjones@gmail.com> 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