We should have access to the 'type_info' of any object that is thrown,
even if it is caught inside a 'catch(...)' block. [...]
http://www.virjacode.com/papers/typeid_except.htm
- Remove the default argument.
- Pass the exception_ptr by const&, for efficiency: we are only reading it, not "sinking" it. (Compare
P2927.)
- What is the motivation for this facility? It doesn't seem useful to get a typeid, because you can't do anything with a typeid. You can't even compare the typeid to anything to learn e.g. whether the exception IS-A std::exception. This doesn't seem useful at all, without further major additions to std::type_info. If you think it is useful somehow, you should put that in the paper; and if you don't think it's useful, then you shouldn't waste our (or anyone's) time with it.
–Arthur