220 21737 <561DBB7C.80403@gmail.com> article
Path: news.gmane.org!not-for-mail
From: Evgeny Panasyuk <evgeny.panasyuk@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: is await an extension of the do-notation? (was Re:
 Re: Resumable expressions p0114r0 vs async/await P0057R0)
Date: Wed, 14 Oct 2015 05:18:36 +0300
Lines: 40
Approved: news@gmane.org
Message-ID: <561DBB7C.80403@gmail.com>
References: <639f0012-8cb4-4db3-82a6-8d042a3497f9@isocpp.org>
 <401aa118-ed0b-4c7b-92cf-3fbd706eff9d@isocpp.org>
 <fcbcc1c4-535c-4fa2-a17d-4acffe84a4b5@isocpp.org>
 <1d15dbc4-e0c1-4df1-86db-014e11f14d26@isocpp.org>
 <56114953.4030701@wanadoo.fr> <561B403D.4030403@gmail.com>
 <CAOfiQqkKvZfVatJ1Bz4qSvGc-g6iep0xeP1B1=J1-gCu43NXxg@mail.gmail.com>
 <561C07D1.3080304@gmail.com>
 <CAOfiQqnR4GYCttwu8G-44_UEN4WekW19uorEvf-5VC3vOpej-g@mail.gmail.com>
 <561C213F.1060009@gmail.com>
 <fb82d876-8a54-4c28-8e53-297018470cf6@isocpp.org>
 <561C3875.2050701@gmail.com>
 <86924069-44d0-447f-bf8a-a42e46579832@isocpp.org>
 <561D79A7.8080007@gmail.com>
 <894616d6-9609-4038-b2bc-d2c62df21e0f@isocpp.org>
 <99bdb3ae-9214-4440-8572-4c47a61eda46@isocpp.org>
 <78f1c83a-f866-4f64-aba2-939078fdc58b@isocpp.org>
 <d1f75390-7dce-484e-9ac3-342026de25be@isocpp.org>
 <561DA103.3040902@gmail.com>
 <3ec60032-9390-4606-8a32-870a57163fc3@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
X-Trace: ger.gmane.org 1444789130 31896 80.91.229.3 (14 Oct 2015 02:18:50 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Wed, 14 Oct 2015 02:18:50 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBC54TLGKR4LBBAPX62YAKGQEPB6ALDY@isocpp.org Wed Oct 14 04:18:46 2015
Return-path: <std-proposals+bncBC54TLGKR4LBBAPX62YAKGQEPB6ALDY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-wi0-f200.google.com ([209.85.212.200])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBC54TLGKR4LBBAPX62YAKGQEPB6ALDY@isocpp.org>)
	id 1ZmBeO-0003e7-1d
	for gclcip-std-proposals@m.gmane.org; Wed, 14 Oct 2015 04:18:44 +0200
Original-Received: by wicgb1 with SMTP id gb1sf19072100wic.3
        for <gclcip-std-proposals@m.gmane.org>; Tue, 13 Oct 2015 19:18:43 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:from:subject:to:references:message-id:date
         :user-agent:mime-version:in-reply-to:content-type: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=EkRGzBsO0I1rc+v84g3R4dlXiSdCu/u+TLE6QDlUmNI=;
        b=ah+p9X2ITDCbXsce5Fs8XkVm4IfES3zpC3jroSgHdr8pdrvgF5ObmDT6/w0V4dFOPO
         dPvtgQ73OCxF7+tRtcGhBHxITzbGmV4MYvdh5+9+03j6pgmDS23e69uwNE2w3PTOJcem
         iA9Ns951r47RBnpjJZMHmOs9CGv+a/WgRA3oHWKbtnyXs3rDScUmsuQSL7fzjt6iHiaT
         j535ndZ5zwqUbdQav++GgXK5TsJK/RN2VNPHZzCthzQHEAEzPrVNGnhowOvbs27yikvW
         /Ed8YLbdQ8W9rywcCnMYHe9Cb7GZ3WaFXHDUiOaj+h607tTtwcRz+V0S8VB1irXjkYnW
         LTmA= 
X-Gm-Message-State: ALoCoQn8/tkTPu4kT/DQxAlVm2UyRpUp5frh2myncMqsIXAg2nlck8Y4ty2gGgYe8nRiN0GDdpwO
X-Received: by 10.194.94.66 with SMTP id da2mr115159wjb.7.1444789123607;
        Tue, 13 Oct 2015 19:18:43 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.25.29.148 with SMTP id d142ls651504lfd.27.gmail; Tue, 13 Oct
 2015 19:18:40 -0700 (PDT)
X-Received: by 10.112.171.10 with SMTP id aq10mr236767lbc.85.1444789120930;
        Tue, 13 Oct 2015 19:18:40 -0700 (PDT)
Original-Received: from mail-lf0-x230.google.com (mail-lf0-x230.google.com. [2a00:1450:4010:c07::230])
        by mx.google.com with ESMTPS id rf9si4053814lbb.47.2015.10.13.19.18.40
        for <std-proposals@isocpp.org>
        (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Tue, 13 Oct 2015 19:18:40 -0700 (PDT)
Received-SPF: pass (google.com: domain of evgeny.panasyuk@gmail.com designates 2a00:1450:4010:c07::230 as permitted sender) client-ip=2a00:1450:4010:c07::230;
Original-Received: by lffy185 with SMTP id y185so4764627lff.2
        for <std-proposals@isocpp.org>; Tue, 13 Oct 2015 19:18:40 -0700 (PDT)
X-Received: by 10.25.37.196 with SMTP id l187mr160113lfl.101.1444789120783;
        Tue, 13 Oct 2015 19:18:40 -0700 (PDT)
Original-Received: from [192.168.0.186] (81.13.117.87.donpac.ru. [87.117.13.81])
        by smtp.googlemail.com with ESMTPSA id o195sm965916lfe.17.2015.10.13.19.18.39
        for <std-proposals@isocpp.org>
        (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Tue, 13 Oct 2015 19:18:40 -0700 (PDT)
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101
 Thunderbird/38.3.0
In-Reply-To: <3ec60032-9390-4606-8a32-870a57163fc3@isocpp.org>
X-Original-Sender: Evgeny.Panasyuk@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of evgeny.panasyuk@gmail.com designates 2a00:1450:4010:c07::230 as
 permitted sender) smtp.mailfrom=evgeny.panasyuk@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-Spam-Checked-In-Group: 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: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:21737
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/21737>

14.10.2015 3:34, Gor Nishanov:
>
> On Tuesday, October 13, 2015 at 5:25:45 PM UTC-7, Evgeny Panasyuk wrote:
>
>     What about "vector<coroutine>(N)" use case? As I can see - overhead
>     of N
>     allocations can't be elided automatically.
>
>
> How can P0114 help you with that? Coroutine state is uncopyable and
> unmovable there as well.

It does not erase type:
"
No hidden memory allocations. The memory representation of a resumable 
expression can be wherever you need it: on the stack, a global, or a 
member of a possibly heap-allocated object.
"

And there is possibility for copyability:
"
10.1 Allowing copyability
By allowing copyability of resumable objects, we enable interesting use 
cases such as undo stacks. Although this behaviour comes with risk 
associated with aliasing of local variables, an explicit opt in may be 
feasible.
"

But, even if there would be no copyability/moveability, and as the 
result we cannot use std::vector - we still can place N coroutines into 
array with single allocation: make_unique<coroutine[]>(N)

-- 

--- 
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/.

.
