$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [boost] [Algorithm] contains(v, 1)
From: Jean-Philippe DUFRAIGNE (jp_at_[hidden])
Date: 2018-06-03 14:45:32
On 5/31/18 3:14 AM, Olaf van der Spek via Boost wrote:
> Hi,
>
> vector<int> v;
> contains(v, 1);
>
> This doesn't work as contains expects two ranges (AFAIK).
> Is there some other function that's usable for this purpose?
> Should contains support a value for argument 2?
>
> Gr,
>
Hi,
This algorithm exists: boost::any_of_equal
https://www.boost.org/doc/libs/1_67_0/libs/algorithm/doc/html/the_boost_algorithm_library/CXX11/any_of.html
Thanks;
Jean-Philippe