
10 Feb
2004
10 Feb
'04
9:02 p.m.
Pavel Vozenilek wrote:
"Daniel Wallin" <dalwan01@student.umu.se> wrote
AFAICT there is no way to determine the most derived type.
There is. Relation between types is stored in application in order to enable exception catching mechanism.
If you throw pointer to type T during runtime, you can find if it is most derived than other types. You need to generate all combinations of catch clauses and try them all. It is rather slow but tricks can be used to sped it up.
You are right, very cool! -- Daniel Wallin