220 7168 <2602b3fd-fccd-459b-be1a-93a12005dc5c@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:33:18 -0700 (PDT)
Lines: 62
Approved: news@gmane.org
Message-ID: <2602b3fd-fccd-459b-be1a-93a12005dc5c@isocpp.org>
References: <CAOpASk64dV+3ZUW+Z8wcEqug_oSaztvJp1zsDB_QdAxi+fwcsA@mail.gmail.com>
 <fe7981d7-4eaf-4132-9150-4ec7d3ff7ac4@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; 
	boundary="----=_Part_503_4340383.1381264398442"
X-Trace: ger.gmane.org 1381264397 31266 80.91.229.3 (8 Oct 2013 20:33:17 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Tue, 8 Oct 2013 20:33:17 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCN7B34JVEARBD6Y2GJAKGQERQH7BMI@isocpp.org Tue Oct 08 22:33:21 2013
Return-path: <std-proposals+bncBCN7B34JVEARBD6Y2GJAKGQERQH7BMI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-oa0-f72.google.com ([209.85.219.72])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCN7B34JVEARBD6Y2GJAKGQERQH7BMI@isocpp.org>)
	id 1VTdy5-0003M1-BL
	for gclcip-std-proposals@m.gmane.org; Tue, 08 Oct 2013 22:33:21 +0200
Original-Received: by mail-oa0-f72.google.com with SMTP id i4sf1587074oah.3
        for <gclcip-std-proposals@m.gmane.org>; Tue, 08 Oct 2013 13:33:20 -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=8WA/HSZUHdBPr7/2wacMJG89npWwLzf4j2iI8yB/+g8=;
        b=cuFAhxX93zgxloWXDHsbAnR+O/BY4B0wfZiITBwpNX8BmkJlikS84VdTu0fw6JJMEr
         Mqo9KT6tz6nqkkRlFLIm399fymZvRvRwJWVeIH64YxY3eXyP9/Y1+Iu9ht8Cpo6tFDtU
         xY4jeKnYVURNXcwBZJilFD8vmMYP0E5GONgUMGdIOKppX0819J+qV0Neh3CEq5ZWT9iX
         IwNpHh7ablxXJKRE4lFjkcvcJutajr9Hp451peTc1SSx3yfBef6Ehrc6LrdtOCBKIlE/
         LSNvI8ikckTrO1TbB4ahKASyiJn9FKyOtX/4++AP9V0C2TuRinLKW25Dt8jXjDKwht0N
         w6XQ==
X-Received: by 10.42.179.10 with SMTP id bo10mr1936858icb.8.1381264400303;
        Tue, 08 Oct 2013 13:33:20 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.50.118.97 with SMTP id kl1ls3910904igb.35.canary; Tue, 08 Oct
 2013 13:33:19 -0700 (PDT)
X-Received: by 10.50.39.78 with SMTP id n14mr169558igk.14.1381264399750;
        Tue, 08 Oct 2013 13:33:19 -0700 (PDT)
In-Reply-To: <fe7981d7-4eaf-4132-9150-4ec7d3ff7ac4@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:7168
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/7168>

------=_Part_503_4340383.1381264398442
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Yes, the behavior is like find_if + distance, but the performance is better=
=20
(except maybe for random access iterator). I propose a template=20
specialization for random access iterator in order to be at least as fast=
=20
as find_if + distance.

Le mardi 8 octobre 2013 22:27:10 UTC+2, Evgeny Panasyuk a =E9crit :
>
> 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) .
>

--=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_503_4340383.1381264398442
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Yes, the behavior is like find_if + distance, but the perf=
ormance is better (except maybe for random access iterator). I propose a te=
mplate specialization for random access iterator in order to be at least as=
 fast as find_if + distance.<br><br>Le mardi 8 octobre 2013 22:27:10 UTC+2,=
 Evgeny Panasyuk a =E9crit&nbsp;:<blockquote 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 sho=
uld be returned. Just think what happens when input range is single pass.<b=
r>Plus, maybe special versions for RandomAccessIterator via compile time di=
spatch (with better performance) .<br></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_503_4340383.1381264398442--

.
