is_floating - RTTI specification.

Daveed Vandevoorde daveed at edg.com
Wed Oct 13 18:26:02 UTC 1999


Coleen Phillimore wrote:
> 
> In Daveeds RTTI paper, the defn of base class info is:
> 
>    struct std::__base_class_info {
>     std::type_info *type; /* Null if unused. */
>     std::ptrdiff_t offset;
>     int is_direct: 1;
>     int is_floating: 1; /* I.e., virtual or base of virtual subobject. */
>     int is_virtual: 1; /* Implies is_floating. */
>     int is_shared: 1; /* Implies is_floating and the virtual subobject
>                                  appears on multiple derivation paths. */
>     int is_accessible: 1;
>     int is_ambiguous: 1;
>     };
> 
> What is is_floating vs. is_virtual? 

An example makes it clearer:

	struct B {};
	struct V: B {};
	struct D: virtual V {};

The base V is a virtual base of D and therefore its location with respect to
the origin of a D object may "float".  The subbase B is not virtual, but
because it is part of a virtual base subobject, it still has that "floating"
attribute.

> This is the second reference I've
> seen to "floating" base classes.  Can someone point to the description of
> these?
> 
> Also, I take it that "offset" is the offset in the vtable if the base
> class is virtual, rather than real offset into the object?

That was not what I had in mind, but it would also work.  Do you see an
advantage to that approach?

	Daveed




More information about the cxx-abi-dev mailing list