Boost logo

Boost :

Subject: Re: [boost] [Algorithm] contains(v, 1)
From: Devika Krishnadas (devikakrishnadas97_at_[hidden])
Date: 2018-06-02 19:58:52


Hey,
Is it not created because it's just too easy, or because of any other
technical difficulties?
Because if it is the former, beginners in open source like myself could
grab onto some oppurtunities like this!

On Sun 3 Jun, 2018, 1:24 AM mike via Boost, <boost_at_[hidden]> wrote:

> > -----Original Message-----
> > From: Boost <boost-bounces_at_[hidden]> On Behalf Of Robert Ramey
> > via Boost
> > Sent: Saturday, June 2, 2018 9:36 PM
> >
> > [...]
> >
> > template<class F, class C>
> > auto range_adaptor(const C & c){
> > return F(c.begin(), c.end());
> > }
> >
> > so one could say
> >
> > vector<int> v = ...
> >
> > range_adapt(std::find, v);
> >
> > for any collection type.
> >
>
> You know that this doesn't compile, because std::find is a function
> template right?
> (and you are also missing some parts in your function signature, but
> that’s just a minor detail)
>
> Most likely the standard library will finally get a
>
> std::find(range, value)
>
> but that doesn't help with the "problem" that there doesn't exist an
> algorithm
> "contains"/"includes" that searches only for a single element.
>
> > Robert Ramey
> >
>
> Mike
>
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>


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