220 7176 <6e15fc38-8be3-4e74-ade9-e25a8d0e0509@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: lefevreremy@gmail.com
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: "count_while" and "count_until" algorithms
Date: Tue, 8 Oct 2013 13:42:56 -0700 (PDT)
Lines: 91
Approved: news@gmane.org
Message-ID: <6e15fc38-8be3-4e74-ade9-e25a8d0e0509@isocpp.org>
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>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; 
	boundary="----=_Part_869_8757290.1381264976956"
X-Trace: ger.gmane.org 1381264980 5603 80.91.229.3 (8 Oct 2013 20:43:00 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Tue, 8 Oct 2013 20:43:00 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCN7B34JVEARBUW42GJAKGQEDIIBK3Y@isocpp.org Tue Oct 08 22:43:03 2013
Return-path: <std-proposals+bncBCN7B34JVEARBUW42GJAKGQEDIIBK3Y@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ie0-f197.google.com ([209.85.223.197])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCN7B34JVEARBUW42GJAKGQEDIIBK3Y@isocpp.org>)
	id 1VTe7Q-0000SE-5U
	for gclcip-std-proposals@m.gmane.org; Tue, 08 Oct 2013 22:43:00 +0200
Original-Received: by mail-ie0-f197.google.com with SMTP id u16sf28371189iet.8
        for <gclcip-std-proposals@m.gmane.org>; Tue, 08 Oct 2013 13:42:59 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=date:from:to:message-id:in-reply-to:references:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe
         :content-type;
        bh=QC6ocmY4ZQ7TzmCo29Usekwlmr+3eL9VCUIKk90XaVg=;
        b=jHzxwg6VG8Hh8l7MS0ndvpvXLRvZCpXJLSs/KAXZMwgdQL08fJdKbqNPguoL2XdwSK
         bglJQdjG5+AhnJm7yhDtKfsOyVWekeQwSgkeYjLNqSuXk5tD5kss7OJ9YaKk1IB25Krx
         /dupUZY2nCVzOLK4lK0qjiMnLvG7dzvKUFuMTmaMmGeG6N1RnORdenhBWP79jV4x7vT0
         CNe9QCOSugVylJZH49NORNDS7kIr1SWzPwsndISbfnjOEfz3R2cDhEcoodObRizDQeu6
         tt5DmfiLC87J5eg1Oh+y1IXZc7IuLeKXc7r/2OHD89BmHzwj96rntQ0OWZoPk5VD5I0r
         699w==
X-Received: by 10.42.93.207 with SMTP id y15mr2002502icm.20.1381264979019;
        Tue, 08 Oct 2013 13:42:59 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.50.25.97 with SMTP id b1ls3966636igg.1.canary; Tue, 08 Oct
 2013 13:42:58 -0700 (PDT)
X-Received: by 10.50.87.71 with SMTP id v7mr171903igz.11.1381264978449;
        Tue, 08 Oct 2013 13:42:58 -0700 (PDT)
In-Reply-To: <231e6ef1-599d-4877-be6c-55e85e5a4e41@isocpp.org>
X-Original-Sender: lefevreremy@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:7176
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/7176>

------=_Part_869_8757290.1381264976956
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

@Evgeny: Yes, I see the advantage to return both count and iterator, but I=
=20
didn't find an elegant way to do it for the moment.

@Vlad: Why do you want to change the names?



Le mardi 8 octobre 2013 22:36:57 UTC+2, Evgeny Panasyuk a =C3=A9crit :
>
> 9 oct 2013 =D0=B3., 0:33:18 UTC+4 lefev...@gmail.com :
>>
>> Yes, the behavior is like find_if + distance, but the performance is=20
>> better (except maybe for random access iterator). I propose a template=
=20
>> specialization for random access iterator in order to be at least as fas=
t=20
>> as find_if + distance.
>>
>> Le mardi 8 octobre 2013 22:27:10 UTC+2, Evgeny Panasyuk a =C3=A9crit :
>>>
>>> I think to make it useful - both count and iterator should be returned.=
=20
>>> Just think what happens when input range is single pass.
>>> Plus, maybe special versions for RandomAccessIterator via compile time=
=20
>>> dispatch (with better performance) .
>>>
>>
> Just to clarify: do you see that both count and iterator should be=20
> returned?
>

--=20

---=20
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 e=
mail 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-proposa=
ls/.

------=_Part_869_8757290.1381264976956
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><span class=3D"_username"><span style=3D"color: rgb(34, 34=
, 34);" class=3D"GJHYW0UCLMB"></span></span>@Evgeny: Yes, I see the advanta=
ge to return both count and iterator, but I didn't find an elegant way to d=
o it for the moment.<br><br>@Vlad: Why do you want to change the names?<br>=
<br><br><br>Le mardi 8 octobre 2013 22:36:57 UTC+2, Evgeny Panasyuk a =C3=
=A9crit&nbsp;:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-l=
eft: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr"=
>9 oct 2013&nbsp;=D0=B3., 0:33:18 UTC+4 <a>lefev...@gmail.com</a> :<blockqu=
ote class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1=
px #ccc solid;padding-left:1ex"><div dir=3D"ltr">Yes, the behavior is like =
find_if + distance, but the performance is better (except maybe for random =
access iterator). I propose a template specialization for random access ite=
rator in order to be at least as fast as find_if + distance.<br><br>Le mard=
i 8 octobre 2013 22:27:10 UTC+2, Evgeny Panasyuk a =C3=A9crit&nbsp;:<blockq=
uote class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:=
1px #ccc solid;padding-left:1ex"><div dir=3D"ltr">I think to make it useful=
 - both count and iterator should be returned. Just think what happens when=
 input range is single pass.<br>Plus, maybe special versions for RandomAcce=
ssIterator via compile time dispatch (with better performance) .<br></div><=
/blockquote></div></blockquote><div><br><span lang=3D"en"><span>Just to cla=
rify</span></span>: do you see that  both count and iterator should be retu=
rned?</div></div></blockquote></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 />

------=_Part_869_8757290.1381264976956--

.
