Terminology

Jim Dehnert dehnert at baalbek.engr.sgi.com
Wed Jan 19 00:47:01 UTC 2000


> Folks --
> 
>   This is a nit.
> 
>   I think we should find a term other than "polymorphic" to use in the
> data layout specification. 
> 
>   The C++ standard says:
> 
>     [class.virtual]
> 
>     A class that declares or inherits a virtual function is called a
>     polymorphic class. 
> 
>   but the ABI document says:
> 
>     polymorphic class:
> 
>     A class requiring a virtual table pointer (because it or its bases
>     have one or more virtual member functions or virtual base
>     classes).
> 
>   The ABI definition is broader than the C++ standard; the C++
> standard does not include a class with no virtual functions but with
> virtual bases.  That's a confusing overloading of terms.  For example,
> g++ has an internal predicate called TYPE_POLYMORHPIC_P which uses the
> C++ standard sense of the term, making for easy readibility.
> 
>   Unfortunately, the best term I can come up with is
> "vptr-containing".  That is, after all, what distinguishes them.

I agree that being at variance with a Standard definition is bad,
but I'm not too fond of "vptr-containing".  Anyone have a better
suggestion?  Better, I think, but still not ideal, might be
pseudo-polymorphic...

-	    Jim Dehnert		dehnert at sgi.com
				(650)933-4272




More information about the cxx-abi-dev mailing list