220 33544 <CAFk2RUbmCYrr8eSKDHq6GDV-VhwPZoPM07Je6r5VPugEhrfpig@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: Wed, 2 Aug 2017 22:07:00 +0300
Lines: 23
Approved: news@gmane.org
Message-ID: <CAFk2RUbmCYrr8eSKDHq6GDV-VhwPZoPM07Je6r5VPugEhrfpig@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> <aec5f733-d43e-4d75-b001-0a0e9d49217f@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 1501700823 5727 195.159.176.226 (2 Aug 2017 19:07:03 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Wed, 2 Aug 2017 19:07:03 +0000 (UTC)
To: "ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBC5JHI7A7ALRBVOFRDGAKGQE46T4H2Y@isocpp.org Wed Aug 02 21:06:59 2017
Return-path: <std-proposals+bncBC5JHI7A7ALRBVOFRDGAKGQE46T4H2Y@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ua0-f197.google.com ([209.85.217.197])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBC5JHI7A7ALRBVOFRDGAKGQE46T4H2Y@isocpp.org>)
	id 1dcyyv-00019h-82
	for gclcip-std-proposals@m.gmane.org; Wed, 02 Aug 2017 21:06:57 +0200
Original-Received: by mail-ua0-f197.google.com with SMTP id d29sf19796397uai.14
        for <gclcip-std-proposals@m.gmane.org>; Wed, 02 Aug 2017 12:07:03 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1501700823; cv=pass;
        d=google.com; s=arc-20160816;
        b=Mvr72JyhYgB8JTFEY1XGPrYns17VtOmC8jFuNSpW5dIu+wx1Z0wtszL+4GV/yViJFm
         rQHKOoKTBIzGVcBnkdbKHnN2PvnWKpxRHV57vGk5WMVAwgMT50VxaHWqsJ0jzDmFX1Mq
         DqlknMdbdjyOkUP0FduV2LS2n0bIO+tnLbp+e4P3HDlRzaAS66QKwCBtXvFaanPLaz0W
         JN/3COtJa8M4Y0L/4W4V6ZW7ob21eUlsIWTCkB0cqonweMlnknXiAfjeos0g7cl/U/G/
         ZzWgvpgmsxJu60rQS150NG7YA3yG0K57NBu9xtPD1ywF/UmL2gZmTo3Wj85kC4Z7l2yf
         zfcg==
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=m5b46SNt+IuZcZihXFYtncF7JGp3rQKOVk0E27qO7JI=;
        b=nuYKmJHO6IavtLPTUodEdDN4sUWIletH0AzuC/NKIziaE98ILtDVAUNTnzYTUIzOBo
         rHKJPc0F1ZmXQYd1a8f/cXbpcIZMB8F2/gP7BJzucraYxUpVliKt1Hk6orlkK7hE0Vth
         gWvhjraY2PVYVNdI4hVqz01fOWGe6Z1+6MsxX1yCylgfHdp6fg4fnu2lbVg8/ivW55BB
         TvDy7rxQqjJ6IpTKlIhFtLqjrurzc7/wIsbaXeLrKkTQNb0B6dPNuudQF41+t2BaLHZF
         vVRl8MnH+ZJW/HcwZT1NXkS/FGin10/s1G/JY0EDrKbOiVSBcg6nI/KA0hE5NrmuMXJL
         QKTQ==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@gmail.com header.b=Y4xyWidK;
       spf=pass (google.com: domain of ville.voutilainen@gmail.com designates 2607:f8b0:400c:c08::232 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=m5b46SNt+IuZcZihXFYtncF7JGp3rQKOVk0E27qO7JI=;
        b=RICO8c3DkpdhL5WzrHXeaAz12gA0+m9AuRjQk+Wriijk0/baVHCQWUocTimcxWob8g
         m7+lS8h0VyRhcAeBOzP7v1N17tbXeofwKliKBM8o3sBbcuSb9xZYU7vJNe+4NciCZ6eE
         gRxuzJB82Sf1kjFLodLQfbltDyLDjHK4f/KbeYPUXaNFTRFq6GQrVR1NQit2HTjQT6BJ
         Arh5bN8E8Ao+53wiQVgTMLwqewlQbFuZ7WGjb2mc14MWDI571Xj1EarNm5YgwxLlbNCW
         sS458RCDDnN0lqG39XRBXdXm+dUWJexTbxbG1GqEg2g27gOMeaSq+oh2glf7JEGwnhWZ
         qrxA==
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=m5b46SNt+IuZcZihXFYtncF7JGp3rQKOVk0E27qO7JI=;
        b=HRnvIea2GhCLF7d6CLmnMcAaC0F/6H7GnIgIFy/1X6+mUYQWMB9N0MqeL7Kcke24iG
         79iDdgxZ7L70yOSWSwq2ybNDX3y3UOfO1rkXzKScayNukwBXa3E3vCEPBjaskpioAMGQ
         3oRbcBvan+WtzS0DkmlOTISprCWtZ59wLgQq6dOTs5v11IFubsILWNR5R5vSEQ1zX/E2
         5crhlPsLhCRjAkeCuzrAQJXvXzDCxp538ZZOUeU7al2Q4BrLAwdqaUOyPBcO5Bk+bmrp
         M7OU+TGGg5Xjdl271dx3jmux728glhxYWbL1ezdh7/nSTkJJ9Ho0wEPTsaf5gKgFEB71
         9VcA==
X-Gm-Message-State: AIVw113c85qTVQnueIYLgTGjNYQ2OJHGJ5Nz+cf0rNzBLgmPq3qup71p
	ytq42vg+59DqfDZC
X-Received: by 10.176.18.211 with SMTP id o19mr16652667uac.15.1501700822965;
        Wed, 02 Aug 2017 12:07:02 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.36.36.202 with SMTP id f193ls24385ita.17.canary-gmail; Wed, 02
 Aug 2017 12:07:01 -0700 (PDT)
X-Received: by 10.31.106.129 with SMTP id f123mr15012991vkc.74.1501700821722;
        Wed, 02 Aug 2017 12:07:01 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1501700821; cv=none;
        d=google.com; s=arc-20160816;
        b=oiSTv7LcXAqfK3/Y5jNK2qU00lHeBpevJEM36v0Z70RD81GmzomBlsVQl0An8felD0
         +7t5VW8YvQHEvt+5ma1+X5CGG+LfHQSiYsKAec2aW4UfbLEXe9INC+gYOgYo5gYsd+fX
         Pp4hSwapr/qRxc/xAfRDtjsWWj3FSjEOsvbbvmzcCAuplUPkeyJdpiJL/eUyI0SuVz2D
         yj43lfY0+j7csEOaZ2GZU72XaJKGothEyQWzDhZ8H7GqL71DbIxzX3uHdPRAwljy+e1i
         0O3sr0EbHOc1z0FZPn8AB2YJsc40nFD9SYn1rdu4jLymj/Aj85i2hyjbJ3wne2JSElwf
         DGNg==
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=ud0+5Y2FdVAbuNI4C07eexJRaVv1y6vrhLYeLZ8/I5E=;
        b=jtXs7Ljt7ceeYxMjJjidbSZxzMFdQKx5M2zXewDrx2dhQ3J22KHiKBWprBZdPe+x4/
         V6d59uxEy8i2Fwj6b0S9mmB6x8QvUb4jQWE2BMeIM1Kj4gBSy4I7PM3AL0G1d+Z0kh4i
         GVunUK4GULEjSxODyzi//Ch7hc8Lt02WrMjACtnXXzvPivgu7agD4ihYP4wCjdaS4B7I
         r1jOUg3hpGwmKcSieWKci8GZTnPftssTVeIz8xKFSm6kTMyyxJjCzXoFDodEJDIDnigx
         7ni0vzltDsPBsBqo1BuxbH+qTAAWifrHK/wEAv+0Hh7gLpt/Lw3T0u76GxauYxAwtHNr
         4jGQ==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@gmail.com header.b=Y4xyWidK;
       spf=pass (google.com: domain of ville.voutilainen@gmail.com designates 2607:f8b0:400c:c08::232 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-x232.google.com (mail-ua0-x232.google.com. [2607:f8b0:400c:c08::232])
        by mx.google.com with ESMTPS id 49si11433483uaj.150.2017.08.02.12.07.01
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Wed, 02 Aug 2017 12:07:01 -0700 (PDT)
Received-SPF: pass (google.com: domain of ville.voutilainen@gmail.com designates 2607:f8b0:400c:c08::232 as permitted sender) client-ip=2607:f8b0:400c:c08::232;
Original-Received: by mail-ua0-x232.google.com with SMTP id f9so24914024uaf.4
        for <std-proposals@isocpp.org>; Wed, 02 Aug 2017 12:07:01 -0700 (PDT)
X-Received: by 10.176.2.205 with SMTP id 71mr18139205uah.161.1501700821258;
 Wed, 02 Aug 2017 12:07:01 -0700 (PDT)
Original-Received: by 10.103.103.65 with HTTP; Wed, 2 Aug 2017 12:07:00 -0700 (PDT)
In-Reply-To: <aec5f733-d43e-4d75-b001-0a0e9d49217f@isocpp.org>
X-Original-Sender: ville.voutilainen@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com header.b=Y4xyWidK;       spf=pass (google.com: domain of
 ville.voutilainen@gmail.com designates 2607:f8b0:400c:c08::232 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:33544
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/33544>

On 2 August 2017 at 21:47, Nicol Bolas <jmckesson@gmail.com> wrote:
> However, I think a small library feature could help make it less painful.
> Right now, we have `current_exception`, which gives us an `exception_ptr`,
> which is completely type-erased. We could give `exception_ptr` a way to
> un-erase the type. After all, the implementation has to have that type
> somewhere, since we can throw and re-catch it.
>
> So perhaps an `any_cast`-like mechanism, that returns either `nullptr` or a
> pointer to the exception object. Only it should work as if it were a
> `dynamic_cast`. Then, we could implement an `exception_visitor` that takes a
> sequence of types and tries them, in order.

The ability to do an any_cast on an exception_ptr would indeed be
nice. I'll see what I can
do. There's a chance that adding such a beast isn't particularly hard
implementation-wise.

-- 
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/CAFk2RUbmCYrr8eSKDHq6GDV-VhwPZoPM07Je6r5VPugEhrfpig%40mail.gmail.com.

.
