VTT Order question

Andreas Hommel hommel at metrowerks.com
Tue Nov 12 11:36:17 UTC 2002


The example in "2.6.2 VTT Order" has a typo:

  class C1 : public virtual V1 { int i; };
    // C1 has no primary base, V2 is secondary base

should be changed to:

  class C1 : public virtual V1 { int i; };
    // C1 has no primary base, V1 is secondary base

Also, shouldn't the secondary VTT for C1 also get a secondary V1-in-C1 in D
vtable pointer? I.e. shouldn't

  // 1. Primary virtual pointer:
  [0] D has virtual bases (complete object vptr)

  // 2. Secondary VTTs:
  [1]  C1 * (has virtual base)

  [2]  C2 * (has virtual bases)
  [3]    V3-in-C2 in D (primary vptr)
  ...

be changed to:

  // 1. Primary virtual pointer:
  [0] D has virtual bases (complete object vptr)

  // 2. Secondary VTTs:
  [1]  C1 * (has virtual base)
  [2]    V1-in-C1 in D (secondary vptr)


  [3]  C2 * (has virtual bases)
  [4]    V3-in-C2 in D (primary vptr)
  ...

Thanks,
______________________________________________________________________
Andreas Hommel                        internet:  hommel at metrowerks.com
Senior C/C++ Compiler Architect         Metrowerks, A Motorola Company




More information about the cxx-abi-dev mailing list