C++ Logo


Advanced search

Re: [std-proposals] RTTI in current_exception

From: Frederick Virchanza Gotham <cauldwell.thomas_at_[hidden]>
Date: Fri, 20 Jan 2023 08:40:38 +0000
On Wed, Jan 18, 2023 at 2:46 AM Jason McKesson wrote:
> It's great that you implemented it on some compilers and all. But you
> did nothing to address the lack-of-motivation problem. You haven't
> explained what you intend to do with the type_info; your proposal
> simply presumes that it is an unalloyed good to be able to get one.

In my last job writing firmware for embedded Linux cameras, and in my
current job programming microcontrollers in microscopes, I'm always
putting in functionality that I have not yet fathomed a use for.
Sometimes this means adding a few exported functions to a shared
library, or adding a new tab to a utility program, or providing a
simple command line program. And sometimes, weeks or months later, I
find out that someone else in the company has been using my tool
extensively. I wrote a 'man in the middle' program to listen to RS232
traffic, and I could not have fathomed just how much use it's getting
elsewhere in the company -- one of the physicists has pretty much
being using it Mon - Fri 9 - 5 for a month or two now to test a
microscope and to manipulate the commands sent to it.

The point I'm making here is that sometimes I form the idea that
something might be useful, even if I myself haven't come up with a use
case yet. Would I ever need RTTI in "catch(...)"? Well the only use I
can fathom right now for it is to print debugging information to a
file (or perhaps show a message box on screen). However somebody else
might come up with a better use for it, something to do with foreign
exceptions maybe.

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.

How do I get one of those 'P0000' numbers and submit the paper to be voted on?

Received on 2023-01-20 08:40:51