Terminology

Mark Mitchell mark at codesourcery.com
Sun Jan 16 20:40:52 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.

--
Mark Mitchell                   mark at codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com




More information about the cxx-abi-dev mailing list