220 31222 <fc546ea4-a355-4a60-a7e7-97927993471d@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: "'Oleg Ageev' via ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: P0534: call/cc, type safety and exceptions
Date: Tue, 28 Feb 2017 18:24:38 -0800 (PST)
Lines: 82
Approved: news@gmane.org
Message-ID: <fc546ea4-a355-4a60-a7e7-97927993471d@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_1333_1169358.1488335078428"
X-Trace: blaine.gmane.org 1488335083 26853 195.159.176.226 (1 Mar 2017 02:24:43 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Wed, 1 Mar 2017 02:24:43 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBD4MBDVTJQIOPYOYYUCRUBEPTSH4Y@isocpp.org Wed Mar 01 03:24:38 2017
Return-path: <std-proposals+bncBD4MBDVTJQIOPYOYYUCRUBEPTSH4Y@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ot0-f198.google.com ([74.125.82.198])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBD4MBDVTJQIOPYOYYUCRUBEPTSH4Y@isocpp.org>)
	id 1citwQ-00060i-FY
	for gclcip-std-proposals@m.gmane.org; Wed, 01 Mar 2017 03:24:34 +0100
Original-Received: by mail-ot0-f198.google.com with SMTP id k4sf24429719otc.4
        for <gclcip-std-proposals@m.gmane.org>; Tue, 28 Feb 2017 18:24:40 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=date:from:to:message-id:subject:mime-version:x-original-sender
         :reply-to:precedence:mailing-list:list-id:x-spam-checked-in-group
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=2DXwervWlukEYYsYtvPSVqiLJufiZ03JVIFn282MPpk=;
        b=PeD+amIi7Sm9p9VbvXPV2+olfdE/X6Vw+LN2zEMT3AYjcGqieAs/ug8gvAwVKy3rmh
         ESCg6i8ZFbdD+uVS3RBxFiqBlgqpsToMENNIh2nHso7vp8pbuWHxCuYdesIkQHq9ns1o
         hNtMIZX32rzFebdhqLYQJdsn8ZQsOWvCVjzzYZg3gV1u2gvHFfRiBrXusiKwN2Ngi0oJ
         0GLVnklJckCBP6M52pL2Rh1TfD+wZ00d2ZYyKaBTLlorFK1lXC2FgV0OIA5fCSUksQXg
         IsiGgYzG6nIkrnDAkPZdellQsVUKZa1BolcBep9tkk7ttNvSOxh2dPYOmp2c+Ifm10Ea
         jNbA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:date:from:to:message-id:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=2DXwervWlukEYYsYtvPSVqiLJufiZ03JVIFn282MPpk=;
        b=maPitksITXaQiEmKToDorwg5Jq1e9PNK29c6ZG3shjqyFVMPZfvM42rY9lYp4fT+hG
         jYDZpH5Qxc9U7NMI05pyxjGr5hYpbXE33EyIMBDPP/DM+8yw2RG8kii0sNGEf4GyP8at
         Zz8Czg4sFP26Pfy1zt+XmW4BQPh2/Ya2L4mWOj3M6r4k7zQ8wWiMFlGR6BrX9wUV+vMg
         buPz0Y0HcmKquCsu2YR79XkWKB1PYbzQ3Crq420ntIVsrxNWDBph+VJCvoQ+mr9OJs+a
         HQX4bYf1g8XehR3dbCvfbQwzsYzAMBhe0QQoutd8gVOvoyGkmCjNRauYAUQSFbA+c/e/
         0h1A==
X-Gm-Message-State: AMke39nJgCk7UuS+3HFDpfVkEl9rn2t92T05b8awEvKjeqE6oIzNRBWFKOmGKjVs5Iy1kw==
X-Received: by 10.157.10.10 with SMTP id 10mr1765660otg.75.1488335080279;
        Tue, 28 Feb 2017 18:24:40 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.157.54.4 with SMTP id w4ls1727963otb.8.gmail; Tue, 28 Feb 2017
 18:24:39 -0800 (PST)
X-Received: by 10.157.7.4 with SMTP id 4mr639558ote.13.1488335079198;
        Tue, 28 Feb 2017 18:24:39 -0800 (PST)
X-Original-Sender: my@cnonim.name
X-Original-From: Oleg Ageev <my@cnonim.name>
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: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://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>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:31222
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/31222>

------=_Part_1333_1169358.1488335078428
Content-Type: multipart/alternative; 
	boundary="----=_Part_1334_464699336.1488335078428"

------=_Part_1334_464699336.1488335078428
Content-Type: text/plain; charset=UTF-8

Hello,

I have some questions about call/cc in proposed implementation

I think possibility put any arguments in continuation and access to them 
through template function it is lack of type safety, and isn't good idea to 
propose it in standard.
Why not specialize continuation with type of input and type of output?
And forward arguments of operator() to constructor of input type.
I rewrote continuation based on boost.context implementation.
Also I get rid of data_available/get_data... why not use optional?
What do you think about it?

https://gist.github.com/cNoNim/bb24a613406de30d2c856bc7df1ab424

Also I don't understand why:

> If an uncaught exception escapes from the entry-function, std::terminate 
> is called.
>

We can catch exception in `run` function of `record` and rethrow in 
`context_exit`

https://gist.github.com/cNoNim/933978b23ccc13746ffe4f21de187ecd 

Sorry for custom naming convention.

-- 
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.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/fc546ea4-a355-4a60-a7e7-97927993471d%40isocpp.org.

------=_Part_1334_464699336.1488335078428
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hello,<br><br>I have some questions about call/cc in propo=
sed implementation<br><br>I think possibility put any arguments in continua=
tion and access to them through template function it is lack of type safety=
, and isn&#39;t good idea to propose it in standard.<br>Why not specialize =
continuation with type of input and type of output?<br>And forward argument=
s of operator() to constructor of input type.<br>I rewrote continuation bas=
ed on boost.context implementation.<br>Also I get rid of data_available/get=
_data... why not use optional?<br>What do you think about it?<br><br>https:=
//gist.github.com/cNoNim/bb24a613406de30d2c856bc7df1ab424<br><br>Also I don=
&#39;t understand why:<br><blockquote class=3D"gmail_quote" style=3D"margin=
: 0px 0px 0px 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-lef=
t: 1ex;">If an uncaught exception escapes from the entry-function, std::ter=
minate is called.<br></blockquote><div><br>We can catch exception in `run` =
function of `record` and rethrow in `context_exit`<br><br>https://gist.gith=
ub.com/cNoNim/933978b23ccc13746ffe4f21de187ecd <br><br>Sorry for custom nam=
ing convention.<br><br></div></div>

<p></p>

-- <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 <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@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 />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/fc546ea4-a355-4a60-a7e7-97927993471d%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/fc546ea4-a355-4a60-a7e7-97927993471d=
%40isocpp.org</a>.<br />

------=_Part_1334_464699336.1488335078428--

------=_Part_1333_1169358.1488335078428--

.
