220 33586 <CANh-dXnsCzCDANQevWh=j-AZ+GciyWxuKomu8GBsA7V72_VUag@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: "'Jeffrey Yasskin' via ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Free function std::contains in algoritm and map
Date: Fri, 4 Aug 2017 08:17:36 -0700
Lines: 81
Approved: news@gmane.org
Message-ID: <CANh-dXnsCzCDANQevWh=j-AZ+GciyWxuKomu8GBsA7V72_VUag@mail.gmail.com>
References: <b7cc5b96-2165-4b4d-a9d3-7ddec49ca626@isocpp.org>
 <CAFk2RUbMLLU6-zfnyFk_=FyAYU=cNNMCb=q6jijNf1Gr_FF+tQ@mail.gmail.com>
 <CAFk2RUaUTWj7xOz3aC-fDy754XYptA0U-SKtmSm+qn9pcek_Dw@mail.gmail.com>
 <CAFk2RUZ8BFq-EEtoEa4hfBkyiTHBSEyYnHS8XrHAC_Rg0t+yhg@mail.gmail.com> <CAFk2RUaiuR_CqbpAXrNjc1+fa01Y0H9nWQvhOvHV=fv0_xZv4A@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="94eb2c1cb8187e46210555ef00b9"
X-Trace: blaine.gmane.org 1501859883 13977 195.159.176.226 (4 Aug 2017 15:18:03 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Fri, 4 Aug 2017 15:18:03 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDDM34EO6QDRBJVASLGAKGQEFBTXEPQ@isocpp.org Fri Aug 04 17:17:54 2017
Return-path: <std-proposals+bncBDDM34EO6QDRBJVASLGAKGQEFBTXEPQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-lf0-f72.google.com ([209.85.215.72])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDDM34EO6QDRBJVASLGAKGQEFBTXEPQ@isocpp.org>)
	id 1ddeML-000363-SJ
	for gclcip-std-proposals@m.gmane.org; Fri, 04 Aug 2017 17:17:53 +0200
Original-Received: by mail-lf0-f72.google.com with SMTP id h89sf3743514lfi.11
        for <gclcip-std-proposals@m.gmane.org>; Fri, 04 Aug 2017 08:18:00 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1501859880; cv=pass;
        d=google.com; s=arc-20160816;
        b=a3Z4jQCIo3adTa3Kz7OfWqMUMK2WyX/h9jpaV368xEEw98NEQ5SzJBAT314f1ijeRi
         qiS6FiTKyeydOUoN4gySmyYSLURHfqXk5cBfxTQKBYd/OK/BzEcjjdkp2a3q0jBIE9mt
         mCJtYS44u6Ym10B7JwqFuaGLUFnG+TAQrimvNdPZsSgoW6ao6f9ofqn1cYJca7BroEeV
         J5RsHIEkThjvOrxGXQXog9QFTgLan4nf/uqrCZ6aGA9J+bgqYYDbhZqDmP3YfCSVlOjj
         Ut0QDfxAOr3z/SLd6DMeIQ7gGA1U2MHL+wDiRPqVzEFTz/KUC9gxOGgd/4TSnrQRndQr
         g1eQ==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:reply-to:to:subject:message-id:date
         :from:references:in-reply-to:mime-version:arc-authentication-results
         :arc-message-signature:dkim-signature:arc-authentication-results;
        bh=5K3iAyMaJyxvq85Pz5N4MBAuFjdtDhbei0PB5Q//8Ic=;
        b=0na29hUZJaCIL5lB1JOO212p/KvHEXqntP7acoIYPGOBxVUrsVIMlxJJdIS1mp9+hW
         8QOKLY3JAQKuJRa9UFVsXBLDmXb+keL8KczMI6QKwotxTvJftRWfsKCsH6Akn+00xOaB
         kvY/wBWBZU17F5scx6dU4tWf1hi4Q3ZZY3weuHe85MvktHPOP98iVB8hZdGlfBfDiD8h
         mkcUlIHWx5b7SP13++9y/iAw64YAsQofys5HmeDFa4PeRvK2gM0W9LyUYUUAoEdNaZfZ
         glaEuqYVnzIbUU8Ki9RXL7B4/K8YQ4DBTc7lxZY/mt4i0ST4+VyxQr2RgZlayw/wH/Pt
         tO2A==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@google.com header.b=Szg/2ZWX;
       spf=pass (google.com: domain of jyasskin@google.com designates 2a00:1450:400c:c0c::233 as permitted sender) smtp.mailfrom=jyasskin@google.com;
       dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=mime-version:in-reply-to:references:from:date:message-id:subject:to
         :x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=5K3iAyMaJyxvq85Pz5N4MBAuFjdtDhbei0PB5Q//8Ic=;
        b=oUmy02DhIlO+2dODwUPWC1zzmX7jx1QjCBRuXsoMv7RdsaJmAQ6kUWoME5PSFx4jR0
         A0rNrW4BzmAssgoKEfAh1IrECggCwH38adaWos+nnjvehsUYTbDbbr8ZAr0QGl09O7yL
         jk6VFdAX1F4qdhChFDA/TS99DUwjLUJ9vabrbk24vjQnw+pFv3PWsUjPDulNgNeSajk5
         tzQrYxaHwBCIkTsEEnopPMoeCE5Fy3cLq/YGTVJ3GgSHvG7Pr6nTa+k1jSoTaf85wK56
         ZUUSTHPVo6IhiNaGj1jgWyn6yukQ1lLCa0KCzrDqRQov7CnVzPpDPKIjWksOnt/3ej79
         jkaw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:mime-version:in-reply-to:references:from:date
         :message-id:subject:to:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=5K3iAyMaJyxvq85Pz5N4MBAuFjdtDhbei0PB5Q//8Ic=;
        b=iGMPdNOG/OTRPUK7psCZ67eGiTHXMANDJski4+4ScehAWFQIL5298QQ52qetuLZ7hv
         DNKOX8S4uDcZKC8npGlRwCx1CFmOTcUOWscM2xIT6WPkp1nuI7kYiTnNOqhz9w0EpNYN
         nQ/fqy70dUCcsGBeLR03xxwYHVL2ECEosNmv+Py/xHiiAB+aoSy0QpHiqFWGzj9fDlI1
         w6Xluf7hmjTHGv+goFQZFada5JOzNHu4keoIwkz+Wn8FqNsufk6goTW/aLyZIpGNU/FM
         KJ3hTqfywhodkE159seV8xaTq1RIX+7fjYq9quNiEtSmW49nvIWDzs1artzVb91oAV3O
         2/cg==
X-Gm-Message-State: AIVw111E8uMp/bwCZNK7YpzaEavzl6qPeh0sq69TzrUcTWuz8D/MA3wj
	3PRtCFLKIM9Isw==
X-Received: by 10.46.77.7 with SMTP id a7mr448489ljb.1.1501859880179;
        Fri, 04 Aug 2017 08:18:00 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.28.39.134 with SMTP id n128ls421809wmn.10.gmail; Fri, 04 Aug
 2017 08:17:58 -0700 (PDT)
X-Received: by 10.80.175.166 with SMTP id h35mr2927075edd.193.1501859878295;
        Fri, 04 Aug 2017 08:17:58 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1501859878; cv=none;
        d=google.com; s=arc-20160816;
        b=nc9JXlbjOGWq0hfcZ6b3ntLjcIKrApm9jhz0ixTpClxYkJXurj4pwzaZaN+WlN6ivv
         vZpvGM3bOUFOn0RR3i8KXGeAFUO/6ZlTHwkP46sPvjCKUFpV1xHfcb9r1VLMTNnAsTm5
         nihaheswwn289Z68mDUYUV8jWrfnicx2dr2hjMo+Vy4J2FiffZ7nILV6IQ2H64YadU4s
         sT34h+GxgwmedRbZjxj+0xym4U5VN5HRw6zTvgnkVy0c2eNkFs42CHCUPJvS1UYQ7Sxm
         8uE2SSqLpw4TaRMsG/wEjEVCtN5QF6hnZIgsSwIbS5U7PT1h1hiBc1sldwEgfolXrDgb
         5MNA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=to:subject:message-id:date:from:references:in-reply-to:mime-version
         :dkim-signature:arc-authentication-results;
        bh=2ZyXlMQ3mlLnatSJXrsEzqQR/Wwr7ZFPu7SHaHVS9dg=;
        b=Nag0CG+3IkyS5MiFjVoM0trPR+cJmayeRVUGvaFb9aH+cWtpTWIo6MhZGdpMo5Q7CN
         sjV1xxegG5e3/ZZbzORlCR0ynHkNeozh8rSS2fL6ZMjrV6aSCIfyTFd/pusj0tjUNPoR
         azV6nRm0dxAXu1j1bA5YSep2LpEaiNRmmjGOmwZTrpORZfCs+SCn5THX5nAeaZWV49fs
         Q89Ej5JjOb2AZ36Zt4LVMbqPD47anJb/8IFRWdMMUlVa3gRH5+PCZFtT9KPNnYuK/AXY
         +gb2a7SkTwKdCBr1cUEmKjyl+YWvtav1OJg/SR4rcvqbU7jkvlD7lWT5IUSUrk7ZpVKX
         /3jQ==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@google.com header.b=Szg/2ZWX;
       spf=pass (google.com: domain of jyasskin@google.com designates 2a00:1450:400c:c0c::233 as permitted sender) smtp.mailfrom=jyasskin@google.com;
       dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com
Original-Received: from mail-wr0-x233.google.com (mail-wr0-x233.google.com. [2a00:1450:400c:c0c::233])
        by mx.google.com with ESMTPS id b9si4500784edj.359.2017.08.04.08.17.58
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Fri, 04 Aug 2017 08:17:58 -0700 (PDT)
Received-SPF: pass (google.com: domain of jyasskin@google.com designates 2a00:1450:400c:c0c::233 as permitted sender) client-ip=2a00:1450:400c:c0c::233;
Original-Received: by mail-wr0-x233.google.com with SMTP id f21so17938127wrf.5
        for <std-proposals@isocpp.org>; Fri, 04 Aug 2017 08:17:58 -0700 (PDT)
X-Received: by 10.223.171.79 with SMTP id r15mr1868182wrc.57.1501859877339;
 Fri, 04 Aug 2017 08:17:57 -0700 (PDT)
Original-Received: by 10.28.216.144 with HTTP; Fri, 4 Aug 2017 08:17:36 -0700 (PDT)
In-Reply-To: <CAFk2RUaiuR_CqbpAXrNjc1+fa01Y0H9nWQvhOvHV=fv0_xZv4A@mail.gmail.com>
X-Original-Sender: jyasskin@google.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@google.com header.b=Szg/2ZWX;       spf=pass (google.com: domain of
 jyasskin@google.com designates 2a00:1450:400c:c0c::233 as permitted sender)
 smtp.mailfrom=jyasskin@google.com;       dmarc=pass (p=REJECT sp=REJECT
 dis=NONE) header.from=google.com
X-Original-From: Jeffrey Yasskin <jyasskin@google.com>
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Google-Group-Id: 399137483710
List-Post: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:33586
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/33586>

--94eb2c1cb8187e46210555ef00b9
Content-Type: text/plain; charset="UTF-8"

On Tue, Aug 1, 2017 at 10:46 AM, Ville Voutilainen <
ville.voutilainen@gmail.com> wrote:

> On 1 August 2017 at 20:31, Ville Voutilainen
> <ville.voutilainen@gmail.com> wrote:
> >>> Just use std::count and map::count.
> >>
> >> ..well, except that wastes cycles since it won't stop before the end
> >> of the range for vector.
> >
> > ..which means that for vector, any_of is what you want. It's not named
> > 'contains', and you'll just
> > have to live with it.
>
> ..sigh, which doesn't have a value overload. I would think a contains
> function would fare
> better in Ranges than in the current standard library.
>

:) We got a paper for adding contains() to containers in Toronto:
https://wg21.link/P0458

-- 
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CANh-dXnsCzCDANQevWh%3Dj-AZ%2BGciyWxuKomu8GBsA7V72_VUag%40mail.gmail.com.

--94eb2c1cb8187e46210555ef00b9
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On T=
ue, Aug 1, 2017 at 10:46 AM, Ville Voutilainen <span dir=3D"ltr">&lt;<a hre=
f=3D"mailto:ville.voutilainen@gmail.com" target=3D"_blank" class=3D"gmail-c=
remed cremed">ville.voutilainen@gmail.com</a>&gt;</span> wrote:<br><blockqu=
ote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px=
 solid rgb(204,204,204);padding-left:1ex">On 1 August 2017 at 20:31, Ville =
Voutilainen<br>
<span class=3D"gmail-">&lt;<a href=3D"mailto:ville.voutilainen@gmail.com" c=
lass=3D"gmail-cremed cremed">ville.voutilainen@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt; Just use std::count and map::count.<br>
&gt;&gt;<br>
&gt;&gt; ..well, except that wastes cycles since it won&#39;t stop before t=
he end<br>
&gt;&gt; of the range for vector.<br>
&gt;<br>
&gt; ..which means that for vector, any_of is what you want. It&#39;s not n=
amed<br>
&gt; &#39;contains&#39;, and you&#39;ll just<br>
&gt; have to live with it.<br>
<br>
</span>..sigh, which doesn&#39;t have a value overload. I would think a con=
tains<br>
function would fare<br>
better in Ranges than in the current standard library.<br></blockquote><div=
><br></div></div></div><div class=3D"gmail_extra">:) We got a paper for add=
ing contains() to containers in Toronto: <a href=3D"https://wg21.link/P0458=
">https://wg21.link/P0458</a></div></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CANh-dXnsCzCDANQevWh%3Dj-AZ%2BGciyWxu=
Komu8GBsA7V72_VUag%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter"=
>https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CANh-dXnsCzCD=
ANQevWh%3Dj-AZ%2BGciyWxuKomu8GBsA7V72_VUag%40mail.gmail.com</a>.<br />

--94eb2c1cb8187e46210555ef00b9--

.
