220 5258 <bca881ad-7d62-42d6-8e04-eb7320cebed1@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: Xeo <hivemaster@hotmail.de>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Some thoughts about coroutines
Date: Thu, 27 Jun 2013 08:01:02 -0700 (PDT)
Lines: 79
Approved: news@gmane.org
Message-ID: <bca881ad-7d62-42d6-8e04-eb7320cebed1@isocpp.org>
References: <e4828fad-0428-46f8-ad6d-500848c2212b@isocpp.org>
 <291db835-d42d-40cd-8760-47cdf327680d@isocpp.org>
 <7d8a2d85-0995-4833-ad0c-75577f293b63@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; 
	boundary="----=_Part_385_27539585.1372345262210"
X-Trace: ger.gmane.org 1372345265 16427 80.91.229.3 (27 Jun 2013 15:01:05 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Thu, 27 Jun 2013 15:01:05 +0000 (UTC)
Cc: asaelr@gmail.com, asaelr@gmail.com
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCCNBYNYXMJRBLVHWGHAKGQEEBWP23A@isocpp.org Thu Jun 27 17:01:06 2013
Return-path: <std-proposals+bncBCCNBYNYXMJRBLVHWGHAKGQEEBWP23A@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-qa0-f72.google.com ([209.85.216.72])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCCNBYNYXMJRBLVHWGHAKGQEEBWP23A@isocpp.org>)
	id 1UsDh2-0005ww-Bg
	for gclcip-std-proposals@m.gmane.org; Thu, 27 Jun 2013 17:01:04 +0200
Original-Received: by mail-qa0-f72.google.com with SMTP id f14sf1391488qak.11
        for <gclcip-std-proposals@m.gmane.org>; Thu, 27 Jun 2013 08:01:03 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=google.com; s=20120113;
        h=x-beenthere:date:from:to:cc:message-id:in-reply-to:references
         :subject:mime-version:x-original-sender:reply-to:precedence
         :mailing-list:list-id:x-google-group-id:list-post:list-help
         :list-archive:list-subscribe:list-unsubscribe:content-type;
        bh=rEU5vXPjCAMyiZFGudC2RlcZiUEiZ19NIPZFu9bHGwE=;
        b=gMfQ/ZdNykS8Suw7M755DkJXrnPsdM0WY8bdGrYejp77RNBzj0N9cceHxEKR3FIgl9
         /e9PktT+zu2tjSEalF21oyvh86E+Tz59wCbUNgmbNFdliY9TMLradqoQvbPhG27yGVHR
         mFlR1jy6iSV0vatHV3f0uwpNGGVnQY7zhS8MkZxFMms2GHa67TarNIt5HUkI9VQPRc6I
         1hfkNrwOPXB4gnoUCzpCpdMcxYAkUjDzQKQiLiu4A0fQg2ooi0jI7BBphlVxYZfwTAIi
         /beVuthmK/CJkynjYbjHeb2Qi/SDwTseH+1GkZuBVrlwoanRPwEULmLUMJOJHpXo0qs9
         nGUQ==
X-Received: by 10.58.29.1 with SMTP id f1mr1053555veh.34.1372345263448;
        Thu, 27 Jun 2013 08:01:03 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.49.72.233 with SMTP id g9ls841832qev.84.gmail; Thu, 27 Jun
 2013 08:01:02 -0700 (PDT)
X-Received: by 10.49.3.37 with SMTP id 5mr249454qez.30.1372345262679;
        Thu, 27 Jun 2013 08:01:02 -0700 (PDT)
In-Reply-To: <7d8a2d85-0995-4833-ad0c-75577f293b63@isocpp.org>
X-Original-Sender: hivemaster@hotmail.de
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:5258
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/5258>

------=_Part_385_27539585.1372345262210
Content-Type: text/plain; charset=ISO-8859-1


On Thursday, June 27, 2013 4:34:39 PM UTC+2, asa...@gmail.com wrote:
>
> 1) *begin* and *end* are the common way to iterate over something. I'm 
> agree that sometimes we just want to have *auto coro(args);coro();
> 2) You're rig*ht. I had forgotten that class template arguments are not 
> being deducted - even when we just are calling the constructor
>
> If I understood you correctly, you mean to transfrom *int : fib(int n) 
> {/*blablabla/*}* to *fib_class fib(int n) {return fib_class(n);}* , when *
> fib_class* is some unnamed data structure. 

 Yes

auto coro=fib(10);
> auto iter=fib.begin();
>
`fib` is a function. And as I said, if you want to adapt a coroutine to a 
range, just use something that's generic to all kinds of functions. 

++iter; //what does this mean? what is the value of *iter now?
>
`++it` should be a no-op (which is totally allowed by the standard). 

-- 

--- 
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/.



------=_Part_385_27539585.1372345262210
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<br>On Thursday, June 27, 2013 4:34:39 PM UTC+2, asa...@gmail.com wrote:<bl=
ockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border=
-left: 1px #ccc solid;padding-left: 1ex;">1) <i>begin</i> and <i>end</i> ar=
e the common way to iterate over something. I'm agree that sometimes we jus=
t want to have <i>auto coro(args);coro();<br>2) You're rig</i>ht. I had for=
gotten that class template arguments are not being deducted - even when we =
just are calling the constructor<br><br>If I understood you correctly, you =
mean to transfrom <i>int : fib(int n) {/*blablabla/*}</i> to <i>fib_class f=
ib(int n) {return fib_class(n);}</i> , when <i>fib_class</i> is some unname=
d data structure. </blockquote><div>&nbsp;Yes<br><br></div><blockquote clas=
s=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #c=
cc solid;padding-left: 1ex;">auto coro=3Dfib(10);<br>auto iter=3Dfib.begin(=
);<br></blockquote><div>`fib` is a function. And as I said, if you want to =
adapt a coroutine to a range, just use something that's generic to all kind=
s of functions. <br><br></div><blockquote class=3D"gmail_quote" style=3D"ma=
rgin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">=
++iter; //what does this mean? what is the value of *iter now?<br></blockqu=
ote><div>`++it` should be a no-op (which is totally allowed by the standard=
). <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 />
&nbsp;<br />
&nbsp;<br />

------=_Part_385_27539585.1372345262210--

.
