Interoperability of RTTI information

Martin von Loewis loewis at informatik.hu-berlin.de
Wed Sep 27 13:05:01 UTC 2000


> > I see two solutions:
[...]
> I prefer a third solution
> 	c) tighten the wording about place of emission of the type_info
> classes' vtables. tighten the wording about type_info's definition
> indicating the abi definition is in addition to that of the standard.
> Prohibit user derivation of those classes (that could be enforced by
> making the final dtor's private).

I can't picture how this solves the problem at hand. Under this
solution, would it be allowed for implementations to add virtual
functions to the classes beyond those (currently) specified by the
standard and the ABI?

If yes, how does it solve the problem of different implementations
assuming different virtual functions?

If not, how do you determine the dynamic type of a type_info? You
could look at the type_info pointer inside the type_info's virtual
table, and then check compare them with the type_infos for the
well-known types.

I'm not concerned about users inheriting from those classes - if they
do, their compilers will never use the derived classes, so the C++
runtime (__dynamic_cast) won't see instances of such derived classes.

Regards,
Martin





More information about the cxx-abi-dev mailing list