C++ Logo

std-proposals

Advanced search

Re: [std-proposals] RTTI in current_exception

From: Ville Voutilainen <ville.voutilainen_at_[hidden]>
Date: Fri, 20 Jan 2023 10:59:17 +0200
On Fri, 20 Jan 2023 at 10:40, Frederick Virchanza Gotham via
Std-Proposals <std-proposals_at_[hidden]> wrote:
> I think 9 out of 10 -- if not 10 out of 10 -- people here agree that
> we should have access to RTTI inside 'catch(...)' if we want it for
> whatever reason. The second draft of my paper provides the wording to
> be added to the Standard, and provides GNU and Microsoft with the
> required implementations. I can't imagine many people voting against
> this proposal.

The function to get the typeid of an exception needs to be a member
function on exception_ptr. That way I can query
the typeid of a bag of exception_ptrs I get in a container, without
(re-)throwing any of those exceptions in the current thread,
as those exceptions may have been thrown on a different thread.

Again, this time more clearly:
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1066r1.html
received positive encouragement.
So that proposal should be resurrected, not just replaced with
something different.

Received on 2023-01-20 08:59:30