C++ Logo


Advanced search

Re: [std-proposals] std::typeid_except ( Paper Attached )

From: Thiago Macieira <thiago_at_[hidden]>
Date: Sun, 03 Mar 2024 11:50:48 -0800
On Sunday, 3 March 2024 10:04:22 PST Tom Honermann via Std-Proposals wrote:
> Microsoft's C++ exception handling implementation is built on top of SEH
> exceptions. When compiled in cl /EHa mode, a catch(...) handler will be
> entered for SEH exceptions. In this case, there isn't really an
> associated C++ type for the exception. See
> https://learn.microsoft.com/en-us/cpp/cpp/exception-handling-differences?vie
> w=msvc-170. This is obviously implementation-defined territory, but it might
> be worth exploring some. I don't know what std::current_exception() returns
> when called in these cases and it isn't convenient for me to check right
> now. I'd be curious to learn what is done though.

And in the Linux case, catch(...) will also catch the forced unwinding caused
by the PThread thread cancellation. There isn't a current C++ exception in
that case (though the implementation may actually give you a fake one).

Additionally, both SEH and libunwind are used for foreign exceptions too.
Obviously, this is outside the standard of the C++ language.

Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel DCAI Cloud Engineering

Received on 2024-03-03 19:51:09