220 30906 <CAPCFJdTrkxpJHAHdb6FUpoR2W3zpzhabuvkCz3uLcopc2MB0_A@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: =?UTF-8?Q?Micha=C5=82_Dominiak?= <griwes@griwes.info>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Try-Catch function
Date: Wed, 15 Feb 2017 15:32:15 +0000
Lines: 114
Approved: news@gmane.org
Message-ID: <CAPCFJdTrkxpJHAHdb6FUpoR2W3zpzhabuvkCz3uLcopc2MB0_A@mail.gmail.com>
References: <76d9ab0e-4a74-401d-85ad-327f912a1bb7@isocpp.org>
 <CAGNvRgC_Yqj=mMYXVhOpjFMOAY9OurbeMukmkMtJWqKx9sreBA@mail.gmail.com>
 <CAJe+aq8ZYAXgWTuM6DV6NbaGByrLfoXUEz_q1_hJEWT7YrxEvA@mail.gmail.com>
 <b74c80d1-563c-496b-a47b-d7818af52d2b@isocpp.org> <CAPCFJdS+OFvsnKR8LEGdMODANpWzfUGVaDo8izeNovF2nun=hA@mail.gmail.com>
 <09970ac7-82aa-46cb-91a3-38b55dea503e@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=f403045de9524029b205489363ff
X-Trace: blaine.gmane.org 1487172757 20493 195.159.176.226 (15 Feb 2017 15:32:37 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Wed, 15 Feb 2017 15:32:37 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCA6D5ULVYBRBCXJSHCQKGQE2FEHT5Q@isocpp.org Wed Feb 15 16:32:32 2017
Return-path: <std-proposals+bncBCA6D5ULVYBRBCXJSHCQKGQE2FEHT5Q@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ot0-f200.google.com ([74.125.82.200])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCA6D5ULVYBRBCXJSHCQKGQE2FEHT5Q@isocpp.org>)
	id 1ce1Z8-0004SC-0O
	for gclcip-std-proposals@m.gmane.org; Wed, 15 Feb 2017 16:32:22 +0100
Original-Received: by mail-ot0-f200.google.com with SMTP id 19sf81165791oti.0
        for <gclcip-std-proposals@m.gmane.org>; Wed, 15 Feb 2017 07:32:28 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=mime-version:references:in-reply-to:from:date:message-id:subject:to
         :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=t/iHiAi0Y5uJoe4/HXftXMCtNu5Wh3vw1Y7vDxX+iYI=;
        b=U1mIPz1r+YUfKdghjAKIleT9+xEztIO5PkDqA/srBx2kpRK+2YNOVzdcCnM9nEckAY
         kEP5DhVwvsyDUhIR8xQK+vopnMiK2d1LfEksyo5vioxf6lLqJZt4VK+PTyXdUoX1aCll
         oKSIybsZHCk199P7syDz0ndpKQks7ZC0PKWIzCBMqt0Gpk3soLChRA1J55aIv4zZzBfI
         sYRRrQnY4Ph8AtzemiQewAvKUw/DS5Z0LQrZuluN2z2dCYnH6+xUFKTmujfJyg6Q86Dr
         lc2+dzMe1yg3MwJntowjC0+4QC4EXmkbT0tiP+8GChdlt8HrkR3x6IcwL6ChFZxMNruI
         B1Xg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:mime-version:references:in-reply-to:from:date
         :message-id:subject:to: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=t/iHiAi0Y5uJoe4/HXftXMCtNu5Wh3vw1Y7vDxX+iYI=;
        b=IMqC/6Q1ALW7fUTCM4vOa7hn3pbbBJKRi7XPe7mw9tSsytwhL40cg6D7PxzQSiqKsH
         w6Rv4lpppxnHq/+1rMpiPItARrESJsXjD+Ui9r4eVW2iY1rkCk3eQ6+jMBjnMUEIwNwX
         5rXrZkkNK7AHvCgPIGqoqFPE5/9L7RiSfvaPj9SIb/0Bk+aa6OUF5IGQa5ILoZJxshAf
         guWEOPlVabmTwrFm64ZunLU1DzrmK5pUncsxQ57BP/9LyPBsca9PxYSKMtk7+2OkYToK
         1By0oet4vnNYIFCh+8rOj3Z8uN7OChd0grWqw9OS+bk6L6g/sFVcdJJuH0DrOmSpkztN
         uYaQ==
X-Gm-Message-State: AMke39lafEFmtMueb8OwuFqMvBEgz9bhrn8b25o/mdpSKsec5eBf9boTGDrDraJR5jGBAw==
X-Received: by 10.157.67.161 with SMTP id t33mr182641ote.35.1487172747632;
        Wed, 15 Feb 2017 07:32:27 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.157.32.34 with SMTP id n31ls5605636ota.4.gmail; Wed, 15 Feb
 2017 07:32:26 -0800 (PST)
X-Received: by 10.159.32.38 with SMTP id 35mr18554320uam.12.1487172746616;
        Wed, 15 Feb 2017 07:32:26 -0800 (PST)
Original-Received: from mail-ua0-x232.google.com (mail-ua0-x232.google.com. [2607:f8b0:400c:c08::232])
        by mx.google.com with ESMTPS id y71si1285331vky.245.2017.02.15.07.32.26
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Wed, 15 Feb 2017 07:32:26 -0800 (PST)
Received-SPF: neutral (google.com: 2607:f8b0:400c:c08::232 is neither permitted nor denied by best guess record for domain of admin@griwes.info) client-ip=2607:f8b0:400c:c08::232;
Original-Received: by mail-ua0-x232.google.com with SMTP id x12so4507596uax.0
        for <std-proposals@isocpp.org>; Wed, 15 Feb 2017 07:32:26 -0800 (PST)
X-Received: by 10.159.49.25 with SMTP id m25mr18837523uab.87.1487172746054;
 Wed, 15 Feb 2017 07:32:26 -0800 (PST)
In-Reply-To: <09970ac7-82aa-46cb-91a3-38b55dea503e@isocpp.org>
X-Original-Sender: griwes@griwes.info
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@griwes-info.20150623.gappssmtp.com;       spf=neutral (google.com:
 2607:f8b0:400c:c08::232 is neither permitted nor denied by best guess record
 for domain of admin@griwes.info) smtp.mailfrom=admin@griwes.info
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:30906
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/30906>

--f403045de9524029b205489363ff
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On Wed, Feb 15, 2017 at 4:16 PM Nicol Bolas <jmckesson@gmail.com> wrote:

> On Wednesday, February 15, 2017 at 3:59:15 AM UTC-5, Micha=C5=82 Dominiak=
 wrote:
>
> As far as I understand, this already exists in the language (and
> coincidentally is the only way to capture exceptions thrown in a ctor ini=
t
> list).
>
>
> Not quite. If you use function-level try blocks, the catch blocks are not
> considered part of the function itself. So they cannot `return`; they can
> only `throw`. For some reason, the OP wants to be able to return from the=
m.
> Even though they are declare outside of the function.
>

That doesn't sound right.
<http://coliru.stacked-crooked.com/a/8a76fc5a3e24eee0>

> --
> 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/09970ac7-82a=
a-46cb-91a3-38b55dea503e%40isocpp.org
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/09970ac7-82=
aa-46cb-91a3-38b55dea503e%40isocpp.org?utm_medium=3Demail&utm_source=3Dfoot=
er>
> .
>

--=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.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/CAPCFJdTrkxpJHAHdb6FUpoR2W3zpzhabuvkCz3uLcopc2MB=
0_A%40mail.gmail.com.

--f403045de9524029b205489363ff
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_quote"><div dir=3D"ltr">On Wed, Feb 15=
, 2017 at 4:16 PM Nicol Bolas &lt;<a href=3D"mailto:jmckesson@gmail.com">jm=
ckesson@gmail.com</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote"=
 style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><d=
iv dir=3D"ltr" class=3D"gmail_msg">On Wednesday, February 15, 2017 at 3:59:=
15 AM UTC-5, Micha=C5=82 Dominiak wrote:<blockquote class=3D"gmail_quote gm=
ail_msg" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;pad=
ding-left:1ex"><div dir=3D"ltr" class=3D"gmail_msg">As far as I understand,=
 this already exists in the language (and coincidentally is the only way to=
 capture exceptions thrown in a ctor init list).</div></blockquote></div><d=
iv dir=3D"ltr" class=3D"gmail_msg"><div class=3D"gmail_msg"><br class=3D"gm=
ail_msg">Not quite. If you use function-level try blocks, the catch blocks =
are not considered part of the function itself. So they cannot `return`; th=
ey can only `throw`. For some reason, the OP wants to be able to return fro=
m them. Even though they are declare outside of the function.<br class=3D"g=
mail_msg"></div></div></blockquote><div><br></div><div><a href=3D"http://co=
liru.stacked-crooked.com/a/8a76fc5a3e24eee0">That doesn&#39;t sound right.<=
/a>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex=
;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr" class=3D"gma=
il_msg"><div class=3D"gmail_msg"></div></div>

<p class=3D"gmail_msg"></p>

-- <br class=3D"gmail_msg">
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br class=3D"gmail_msg=
">
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" class=3D"gm=
ail_msg" target=3D"_blank">std-proposals+unsubscribe@isocpp.org</a>.<br cla=
ss=3D"gmail_msg">
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" class=3D"gmail_msg" target=3D"_blank">std-proposals@isocpp.org</a>.<b=
r class=3D"gmail_msg">
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/09970ac7-82aa-46cb-91a3-38b55dea503e%=
40isocpp.org?utm_medium=3Demail&amp;utm_source=3Dfooter" class=3D"gmail_msg=
" target=3D"_blank">https://groups.google.com/a/isocpp.org/d/msgid/std-prop=
osals/09970ac7-82aa-46cb-91a3-38b55dea503e%40isocpp.org</a>.<br class=3D"gm=
ail_msg">
</blockquote></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/CAPCFJdTrkxpJHAHdb6FUpoR2W3zpzhabuvkC=
z3uLcopc2MB0_A%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">htt=
ps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAPCFJdTrkxpJHAHd=
b6FUpoR2W3zpzhabuvkCz3uLcopc2MB0_A%40mail.gmail.com</a>.<br />

--f403045de9524029b205489363ff--

.
