220 33580 <CAFk2RUYUnitYibRbvydnTY8RYPXOdUgsr89_WVN4SmLPixCcaA@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Ville Voutilainen <ville.voutilainen@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Catch block for multiple exceptions
Date: Fri, 4 Aug 2017 10:18:36 +0300
Lines: 26
Approved: news@gmane.org
Message-ID: <CAFk2RUYUnitYibRbvydnTY8RYPXOdUgsr89_WVN4SmLPixCcaA@mail.gmail.com>
References: <effe744d-f832-42c7-9b2a-ef31551067d0@isocpp.org>
 <deaedeb0-a699-49e9-826a-c41e674902c0@isocpp.org> <CAEfefmzCWDwP2ha7UfvvPrW_56TT4DEgvwRyxWm=6gS_GZc7pA@mail.gmail.com>
 <4126837.jZlGhgVnua@tjmaciei-mobl1> <d14636de-fb57-47b3-8666-7976ccdb6fe8@isocpp.org>
 <d58143f8-c128-3745-b835-1e04a5760d0d@gmail.com> <CA+fGSbMB3=H4hetWu3GFPzUskLP_sh0Q=Q4oxsUsZ6ci-jrpxg@mail.gmail.com>
 <CAFk2RUbdEQMQB4qLCDeaHeF0Q4ntbZG7-Cuf0X2G8d5+Dpf1Pw@mail.gmail.com>
 <54580edb-4a76-4241-b5c8-19ccbc1a562e@isocpp.org> <CAFk2RUZncz91iozp5d=WVhPCHwLa67dhmpwBRMEU5xioJvPuRA@mail.gmail.com>
 <4c872807-7d50-4b58-bbb5-595a8bac1246@isocpp.org> <CAFk2RUa2teYd3DAg1VY3xF=vCNKUfna4emTSCYLuUa8dw_UmSg@mail.gmail.com>
 <caf74994-b217-4108-80ce-664e64510e34@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Trace: blaine.gmane.org 1501831119 6651 195.159.176.226 (4 Aug 2017 07:18:39 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Fri, 4 Aug 2017 07:18:39 +0000 (UTC)
To: "ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBC5JHI7A7ALRBTN7SDGAKGQERDTW24Q@isocpp.org Fri Aug 04 09:18:34 2017
Return-path: <std-proposals+bncBC5JHI7A7ALRBTN7SDGAKGQERDTW24Q@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-yw0-f199.google.com ([209.85.161.199])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBC5JHI7A7ALRBTN7SDGAKGQERDTW24Q@isocpp.org>)
	id 1ddWsT-0001M0-Gd
	for gclcip-std-proposals@m.gmane.org; Fri, 04 Aug 2017 09:18:33 +0200
Original-Received: by mail-yw0-f199.google.com with SMTP id c206sf15859038ywb.12
        for <gclcip-std-proposals@m.gmane.org>; Fri, 04 Aug 2017 00:18:39 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1501831119; cv=pass;
        d=google.com; s=arc-20160816;
        b=fZzFCNeDaVE7gD9TXZNXw0KQDhWCZiVd0Fm5je6EqLvsnKuxh+oPKoFD/wKGK5p3Bw
         Fr1v9rQ2AIVKuB7b+WIa82/yn8dhD5B/iO0nnz5aPChgOEuSHuTNAr72jE6UVzxhktO5
         BZ9De36h2ij96fmRM7d6Wuay5v+4fgYPUkBZxE35RLKNLR+9JsFERZ3HvByIXs9OvrJp
         bKCcQPQZvZWVGSv8eWOVmO6XwznsgiyMtvDExF5H9cvvowvi5YuzvOshZxNVLBoZehaz
         O3vC4ir2/HvYdYW4DP7y4he3jbHGAb8ws2exn9x+LAZ7MtJzcte8U3ksR/cPXOk/kozA
         bYUQ==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:reply-to:to:subject:message-id:date
         :from:references:in-reply-to:mime-version:arc-authentication-results
         :arc-message-signature:dkim-signature:arc-authentication-results;
        bh=ewM36Oyxyq8skO4HIXEMmji32y+vLZkjQRSpaGtIz4I=;
        b=jLFF+RhjXYLi0gpNZ5FaQj4DeyXlH75z4G+PTY2SfsqdVHYfKJaoHbXCaQKXY1AVHd
         q8fFwC1lOxZp0mcgIAdjzXvKci13kUam3UkSUU2bUcEaczmpjAv/LNcSIJyiodJVTfMQ
         K592tUWmGN6pM07Lp3jSsFO5FLLJGyIBqCAD0GhgTdq3L0890efYrY7yOgLF3XJ1Wgv5
         bt5o27ZuK9zhIIEORtxlhrp9aUsehaDXwttp3GRwbsL0nmtsPIOYTxLyjrzFoHdcreDs
         JsudjYGy43RWoAhU0SEV9xTqZXVc8KPwUDZrLGrdiNmgUEdIfK/AxRVPHZ3IQWOdrVbo
         t3UA==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@gmail.com header.b=BG5c9uqg;
       spf=pass (google.com: domain of ville.voutilainen@gmail.com designates 2607:f8b0:400c:c08::22e as permitted sender) smtp.mailfrom=ville.voutilainen@gmail.com;
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=mime-version:in-reply-to:references:from:date:message-id:subject:to
         :x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=ewM36Oyxyq8skO4HIXEMmji32y+vLZkjQRSpaGtIz4I=;
        b=oazs+7RCtCWRDfmJAcmzzUd3TO4MrqMd0xBjzJHSV4ijDucKuim2NsjbXOXtuHUj6L
         piYKG954aPv3obrY7zG840n/tGL1iuB9K1ORT+CzA+al0vgHpwuDQ1DwTEJbxhqCiSyY
         f/UhFjFK5mpZQ67wwJRa2jrq5EDlk5gnvVzkU+3oRjQhRAFUxmBDiPi7Vd6atqW/RY7F
         1MNwnHSaIwuKxLXdGRduvwFdCNuQUyZzs6XnO9J6rOq770AGzPRnGfrTTB+MQAQfS27Q
         mz3inoit0eqlZYAyWafSoR+ZYjaFD1r4T3DEEwFwts8tKsCvnz+Ha3jceNUjeT87O5z9
         OKUQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:mime-version:in-reply-to:references: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=ewM36Oyxyq8skO4HIXEMmji32y+vLZkjQRSpaGtIz4I=;
        b=VJpuSGehCvp64H77FA+nCToafks/fBSziMelsA1f0goaCcDwZgSl+FhSfVSpnSuCUs
         gMaSHTDj/MdD+y2WG+WsoAp9O+LoeWhrbyWuJ0CJkhlAVomYeiz60GfZFgFHr1u+nPL/
         iwjpAROKgPlpz5rEybmWk+N2hLNBRmFEwd39GN6A13zkmmbnfCuUgVL26/O2lunP+Hid
         I58Ym9Ey5LjY/PhzaJP7zj93omoJffMhUNT89iILAga2XgyhUIYFrh3xDHDo1if1yEdV
         cCqv+iH205jaGorG/r3c1Nu9GT9dxJKco8mVDX0T59CbdlTtGmRcTSuherdWr12PyBvB
         8iRg==
X-Gm-Message-State: AIVw113kGupiYc816y3uvIzeB380VWsBYTyf6QMLqlH3gJjHCeX+QQGu
	v11M0KbXa2AsY0Wa
X-Received: by 10.129.141.76 with SMTP id w12mr1042122ywj.14.1501831119065;
        Fri, 04 Aug 2017 00:18:39 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.36.67.133 with SMTP id s127ls1082994itb.8.canary-gmail; Fri,
 04 Aug 2017 00:18:37 -0700 (PDT)
X-Received: by 10.31.50.129 with SMTP id y123mr929203vky.202.1501831117593;
        Fri, 04 Aug 2017 00:18:37 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1501831117; cv=none;
        d=google.com; s=arc-20160816;
        b=QLx1ldOUVAaW3pRTnbifYFlB01kEJQ7/owhttscxYTTyjeejtMrvXDScj6J9ZnLynB
         xmH78Thidu0Sunjg5wJSd7bIgFQqZyGGJ69IPbultQr+XYrM6oj8eL12HdQ1nEIA1UJ5
         uzwXMKZNAPq3Q5SKNsd3S+gftghwYJTZYR6ZKQ4k3fywiepS2EwB3dLxYxuNOaeBZdib
         +4aa7V95ZETy2LcIm/Bsb0XDfFRdlgphubYNMm+FqEIlVSlRsl77nsE/PCUkNsLTOX1b
         q4NA/2dUAb+wT7o1NLH4miQU7ICfILfEQAxVBSKnkpHr6fAmlHWWTfVLKhyQMSkHa0gM
         O2iA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=to:subject:message-id:date:from:references:in-reply-to:mime-version
         :dkim-signature:arc-authentication-results;
        bh=op6P7djOEGY38jIsWJzu98zXbDuaHZCW01lOdapgz6s=;
        b=B74E3tthntKB83rizLTX6Sk0HaCBfA/xOV7W9T/TAcMmrJQ9yji+KNA02NN3n3rP3A
         JlqhPpnaW3I5Pe6w95ZAhqAQG0BXaSoxOh8uo2jIwhOurDuOy/i0U6+ogzQvP3nebaI6
         dkYGwYAzDWZ/LwhZwwrDSFk8qsI/4myLWY0AfzKoYwveLM7GAY9EBj5aKJUg74O3uV5x
         hSpRnpJX6Mdqd9CJfsPyOwvO/PyAOfRvXTN0SxH03aa0AcpZsqQLxQUP7J4PnH2HmfB9
         6B/W22/YEVp4kyfvVyeMs1AFhzqSkBYdCESjkAEJeR0EK5wB3O2Fq0t6Kr/kk4CkaMeZ
         Mm4A==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@gmail.com header.b=BG5c9uqg;
       spf=pass (google.com: domain of ville.voutilainen@gmail.com designates 2607:f8b0:400c:c08::22e as permitted sender) smtp.mailfrom=ville.voutilainen@gmail.com;
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com
Original-Received: from mail-ua0-x22e.google.com (mail-ua0-x22e.google.com. [2607:f8b0:400c:c08::22e])
        by mx.google.com with ESMTPS id n71si585110vka.193.2017.08.04.00.18.37
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Fri, 04 Aug 2017 00:18:37 -0700 (PDT)
Received-SPF: pass (google.com: domain of ville.voutilainen@gmail.com designates 2607:f8b0:400c:c08::22e as permitted sender) client-ip=2607:f8b0:400c:c08::22e;
Original-Received: by mail-ua0-x22e.google.com with SMTP id w45so3644636uac.5
        for <std-proposals@isocpp.org>; Fri, 04 Aug 2017 00:18:37 -0700 (PDT)
X-Received: by 10.176.28.71 with SMTP id o7mr901796uaj.38.1501831117118; Fri,
 04 Aug 2017 00:18:37 -0700 (PDT)
Original-Received: by 10.103.103.65 with HTTP; Fri, 4 Aug 2017 00:18:36 -0700 (PDT)
In-Reply-To: <caf74994-b217-4108-80ce-664e64510e34@isocpp.org>
X-Original-Sender: ville.voutilainen@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com header.b=BG5c9uqg;       spf=pass (google.com: domain of
 ville.voutilainen@gmail.com designates 2607:f8b0:400c:c08::22e as permitted
 sender) smtp.mailfrom=ville.voutilainen@gmail.com;       dmarc=pass (p=NONE
 sp=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-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:33580
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/33580>

On 4 August 2017 at 04:25, Nicol Bolas <jmckesson@gmail.com> wrote:
>> different things. However, unerasing the type of an any and an
>> exception_ptr are
>> exactly the same.
>
>
> Not really. The key difference being that `any_cast` typically returns a
> copy of the object, while the exception pointer cast would return a pointer.
>
> It should also be noted that the exception pointer cast needs to be able to
> be cast to the actual exception type or any of its base classes. So if the
> exception derives from `std::exception`, then doing
> `exception_cast<std::exception>` should work. `any_cast` very much does not
> have those semantics.


Ah, yes. Since we want to avoid the cast throwing (that's really the
whole point of allowing such access)
and we want to avoid slicing, it should perhaps *always* return a pointer. ;)

-- 
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/CAFk2RUYUnitYibRbvydnTY8RYPXOdUgsr89_WVN4SmLPixCcaA%40mail.gmail.com.

.
