220 7199 <CAOpASk7V=1N=BJgrSki2sqbYwOUD2puZCh7RQ_DkkvZJA_2Z5A@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: =?ISO-8859-1?Q?R=E9my_Lefevre?= <lefevreremy@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: "count_while" and "count_until" algorithms
Date: Tue, 8 Oct 2013 23:59:05 +0200
Lines: 131
Approved: news@gmane.org
Message-ID: <CAOpASk7V=1N=BJgrSki2sqbYwOUD2puZCh7RQ_DkkvZJA_2Z5A@mail.gmail.com>
References: <CAOpASk64dV+3ZUW+Z8wcEqug_oSaztvJp1zsDB_QdAxi+fwcsA@mail.gmail.com>
 <fe7981d7-4eaf-4132-9150-4ec7d3ff7ac4@isocpp.org> <2602b3fd-fccd-459b-be1a-93a12005dc5c@isocpp.org>
 <231e6ef1-599d-4877-be6c-55e85e5a4e41@isocpp.org> <6e15fc38-8be3-4e74-ade9-e25a8d0e0509@isocpp.org>
 <2d16db0e-fb46-4e1f-956f-db3407a6fb4c@isocpp.org> <1381268094.9101.48.camel@sara>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=047d7b66f599f9b70904e841e23b
X-Trace: ger.gmane.org 1381269591 24372 80.91.229.3 (8 Oct 2013 21:59:51 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Tue, 8 Oct 2013 21:59:51 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCN7B34JVEARBUMA2KJAKGQELRQEVNI@isocpp.org Tue Oct 08 23:59:54 2013
Return-path: <std-proposals+bncBCN7B34JVEARBUMA2KJAKGQELRQEVNI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-we0-f197.google.com ([74.125.82.197])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCN7B34JVEARBUMA2KJAKGQELRQEVNI@isocpp.org>)
	id 1VTfJj-00078M-64
	for gclcip-std-proposals@m.gmane.org; Tue, 08 Oct 2013 23:59:47 +0200
Original-Received: by mail-we0-f197.google.com with SMTP id t60sf5178623wes.8
        for <gclcip-std-proposals@m.gmane.org>; Tue, 08 Oct 2013 14:59:46 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        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:content-type;
        bh=7cGf6HXwBlpWoTgQ30+ZXkUIvwrnA1NmFwKwCciu4ww=;
        b=KnAeCNecNGOtEyQozpd0cSUoRudIgk7XtpoJ4nreBYTXBZVjV7gt2rKJs7JN7gd09l
         Ky3zOk2C7FMKQ3RCSxVz+DljKRX90VVy8XnBl2u+Qjb5PTfOrnxaEkwxi+zhpSQrOnfx
         x1fgDnsS8RlmS5kljPe0dasDJW/SucVhtwsRF7B6rQQL521yGgHujHhULK9Z7cGRtE1e
         lh5miyLZGNo/TPMg1s6w8hOFCLW9oGv+H7igBtSsZoPDKAGroL4lY1Npa7nnCh8GOabw
         1ROKBFUo+rheZ4jWI6aWOpZh8Yjx2NICi0TBXPIUBWYp+SaXJvoy9aGVExZcKuCbdOnY
         N9gw==
X-Received: by 10.180.73.112 with SMTP id k16mr1558140wiv.5.1381269586608;
        Tue, 08 Oct 2013 14:59:46 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.180.88.39 with SMTP id bd7ls1254668wib.47.canary; Tue, 08 Oct
 2013 14:59:45 -0700 (PDT)
X-Received: by 10.180.185.77 with SMTP id fa13mr3526790wic.58.1381269585483;
        Tue, 08 Oct 2013 14:59:45 -0700 (PDT)
Original-Received: from mail-wi0-x22e.google.com (mail-wi0-x22e.google.com [2a00:1450:400c:c05::22e])
        by mx.google.com with ESMTPS id mz18si2176685wic.54.1969.12.31.16.00.00
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Tue, 08 Oct 2013 14:59:45 -0700 (PDT)
Received-SPF: pass (google.com: domain of lefevreremy@gmail.com designates 2a00:1450:400c:c05::22e as permitted sender) client-ip=2a00:1450:400c:c05::22e;
Original-Received: by mail-wi0-f174.google.com with SMTP id hj3so7358052wib.7
        for <std-proposals@isocpp.org>; Tue, 08 Oct 2013 14:59:45 -0700 (PDT)
X-Received: by 10.180.182.68 with SMTP id ec4mr25711265wic.40.1381269585374;
 Tue, 08 Oct 2013 14:59:45 -0700 (PDT)
Original-Received: by 10.194.192.33 with HTTP; Tue, 8 Oct 2013 14:59:05 -0700 (PDT)
In-Reply-To: <1381268094.9101.48.camel@sara>
X-Original-Sender: lefevreremy@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of lefevreremy@gmail.com designates 2a00:1450:400c:c05::22e as
 permitted sender) smtp.mail=lefevreremy@gmail.com;       dkim=pass
 header.i=@gmail.com;       dmarc=pass (p=NONE dis=NONE) header.from=gmail.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: <http://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:7199
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/7199>

--047d7b66f599f9b70904e841e23b
Content-Type: text/plain; charset=ISO-8859-1

I agree with Evgeny for the use of "while" and "until" instead of
"first_if". I think they are more intuitive and make more sense.

Concerning the return_type, it's true that std::pair is already used for
several component in the library and the algorithm shouldn't throw away a
useful information like the first not counted iterator.


2013/10/8 Magnus Fromreide <magfr@lysator.liu.se>

> On Tue, 2013-10-08 at 13:56 -0700, Vlad from Moscow wrote:
> > I want to change the name in the context of my proposal of
> > std::accumulate_first_if that there will be a common name for such
> > types of algorithms.
> >
> > By the way using std::find_if with a predicate resolves the two tasks:
> > returning the count and the last iterator.
>
> If we should change the names then I think the best name would be
>
> distance_first_if
>
> since it is about the distance from one point to another in a range, and
> the end point is defined as the first entry matching a predicate.
>
> (I also think the bikeshed should be pink)
>
> /MF
>
> --
>
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "ISO C++ Standard - Future Proposals" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/a/isocpp.org/d/topic/std-proposals/bXrQrkBw59c/unsubscribe
> .
> To unsubscribe from this group and all its topics, send an email to
> std-proposals+unsubscribe@isocpp.org.
> To post to this group, send email to std-proposals@isocpp.org.
> Visit this group at
> http://groups.google.com/a/isocpp.org/group/std-proposals/.
>

-- 

--- 
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

--047d7b66f599f9b70904e841e23b
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><div>I agree with Evgeny for the use of &quot;while&q=
uot; and &quot;until&quot; instead of &quot;first_if&quot;. I think they ar=
e more intuitive and make more sense.<br><br></div>Concerning the return_ty=
pe, it&#39;s true that std::pair is already used for several component in t=
he library and the algorithm shouldn&#39;t throw away a useful information =
like the first not counted iterator.<br>

</div></div><div class=3D"gmail_extra"><br><br><div class=3D"gmail_quote">2=
013/10/8 Magnus Fromreide <span dir=3D"ltr">&lt;<a href=3D"mailto:magfr@lys=
ator.liu.se" target=3D"_blank">magfr@lysator.liu.se</a>&gt;</span><br><bloc=
kquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #cc=
c solid;padding-left:1ex">

<div class=3D"im">On Tue, 2013-10-08 at 13:56 -0700, Vlad from Moscow wrote=
:<br>
&gt; I want to change the name in the context of my proposal of<br>
&gt; std::accumulate_first_if that there will be a common name for such<br>
&gt; types of algorithms.<br>
&gt;<br>
&gt; By the way using std::find_if with a predicate resolves the two tasks:=
<br>
&gt; returning the count and the last iterator.<br>
<br>
</div>If we should change the names then I think the best name would be<br>
<br>
distance_first_if<br>
<br>
since it is about the distance from one point to another in a range, and<br=
>
the end point is defined as the first entry matching a predicate.<br>
<br>
(I also think the bikeshed should be pink)<br>
<span class=3D"HOEnZb"><font color=3D"#888888"><br>
/MF<br>
</font></span><div class=3D"HOEnZb"><div class=3D"h5"><br>
--<br>
<br>
---<br>
You received this message because you are subscribed to a topic in the Goog=
le Groups &quot;ISO C++ Standard - Future Proposals&quot; group.<br>
To unsubscribe from this topic, visit <a href=3D"https://groups.google.com/=
a/isocpp.org/d/topic/std-proposals/bXrQrkBw59c/unsubscribe" target=3D"_blan=
k">https://groups.google.com/a/isocpp.org/d/topic/std-proposals/bXrQrkBw59c=
/unsubscribe</a>.<br>


To unsubscribe from this group and all its topics, send an email to <a href=
=3D"mailto:std-proposals%2Bunsubscribe@isocpp.org">std-proposals+unsubscrib=
e@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>
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/" target=3D"_blank">http://groups.google.com/a/isocpp.org/gro=
up/std-proposals/</a>.<br>
</div></div></blockquote></div><br></div>

<p></p>

-- <br />
&nbsp;<br />
--- <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 std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

--047d7b66f599f9b70904e841e23b--

.
