<p>I am looking for details of the VTable structure, order and contents, and the location of the vtable pointers within objects. </p>

<p>Ideally, this will cover single inheritance, multiple inheritance, and virtual inheritance.</p>

<p>References to external documentation would also be appreciated</p>

<p>Documentation of GCC 4.0x class layout is <a href="http://www.cse.wustl.edu/~mdeters/seminar/fall2005/mi.html#virtual" rel="noreferrer">here</a> and the Itanium, and more broadly GNU, ABI layout documents are <a href="http://www.codesourcery.com/public/cxx-abi/abi.html#general" rel="noreferrer">here</a>. </p>

[{'answer_id': 25674843, 'author': 'GlGuru', 'author_id': 497840, 'author_profile': 'https://Stackoverflow.com/users/497840', 'pm_score': -1, 'selected': False, 'text': '<p>Most of the compiler implementations that I have seen just "embed" the base object into the derived object. It becomes irrelevant where the vtable is kept because the relative offset into the object will just be added at compile time as references are evaluated. </p>\n\n<p>Multiple and virtual inheritance are more complicated and can require a different offset depending on what is being accessed. </p>\n\n<p>I highly recommend reading this article on Code Project: <a href="http://www.codeproject.com/Articles/7150/Member-Function-Pointers-and-the-Fastest-Possible" rel="nofollow">The Impossibly Fast C++ Delegates</a></p>\n\n<p>It brilliantly gives a broad picture of how different compilers handle various aspects of inheritance. Fantastic read if you are interested in the low level workings of different compilers. </p>\n\n<p>Edit: I linked the wrong article over there. Corrected. </p>\n'}, {'answer_id': 28155780, 'author': 'LThode', 'author_id': 3657206, 'author_profile': 'https://Stackoverflow.com/users/3657206', 'pm_score': 4, 'selected': False, 'text': '<p>A virtual table is generally treated as an array of function pointers, although compilers are free to put data pointers (in MI and VI scenarios, or to typeinfos), integers (for fixups), or sentinel elements (such as NULL pointers) into it as well.  The layout is generally compiler-specific (or ABI-specific where multiple C++ compilers share an ABI), but stable provided the classes being compiled have stable interfaces (otherwise you\'d have to recompile your code all the time, and that\'s a drag).  There are also additional tables that are needed to handle corner cases involving virtual and multiple inheritance, and to make sure that virtual calls during derived class construction behave as the Standard says they should under those circumstances (those are what the VTTs and construction tables in the output below are for).</p>\n\n<p>As to the specific case of GCC 4.x: the <code>-fdump-class-hierarchy</code> switch indeed acts as described (and then some).  I tested it on <a href="http://coliru.stacked-crooked.com/a/16d53eb062d38bec" rel="noreferrer">Coliru</a> using the sample code below:</p>\n\n<pre><code>struct Base\n{\n    virtual ~Base() {}\n    virtual void f() = 0;\n};\n\nstruct OtherBase\n{\n    virtual ~OtherBase() {}\n    virtual void g() {}\n};\n\nstruct Derived: public Base\n{\n    virtual ~Derived() {}\n    virtual void f() {}\n};\n\nstruct MultiplyDerived: public Base, public OtherBase\n{\n    virtual ~MultiplyDerived() {}\n    virtual void f() {}\n    virtual void g() {}\n};\n\nstruct OtherDerived: public Base\n{\n    virtual ~OtherDerived() {}\n    virtual void f() {}\n};\n\nstruct DiamondDerived: public Derived, public OtherDerived\n{\n    virtual ~DiamondDerived() {}\n    virtual void f() {}\n};\n\nstruct VirtuallyDerived: virtual public Base\n{\n    virtual ~VirtuallyDerived() {}\n    virtual void f() {}\n};\n\nstruct OtherVirtuallyDerived: virtual public Base\n{\n    virtual ~OtherVirtuallyDerived() {}\n    virtual void f() {}\n};\n\nstruct VirtuallyDiamondDerived: public VirtuallyDerived, public OtherVirtuallyDerived\n{\n    virtual ~VirtuallyDiamondDerived() {}\n    virtual void f() {}\n};\n\nstruct DoublyVirtuallyDiamondDerived: virtual public VirtuallyDerived, virtual public OtherVirtuallyDerived\n{\n    virtual ~DoublyVirtuallyDiamondDerived() {}\n    virtual void f() {}\n};\n\nstruct MixedVirtuallyDerived: virtual public Base, public OtherBase\n{\n    virtual ~MixedVirtuallyDerived() {}\n};\n\nstruct MixedVirtuallyDiamondDerived: public VirtuallyDerived, public MixedVirtuallyDerived\n{\n    virtual ~MixedVirtuallyDiamondDerived() {}\n    virtual void f() {}\n    virtual void g() {}\n};\n\nstruct VirtuallyMultiplyDerived: virtual public Base, virtual public OtherBase\n{\n    virtual ~VirtuallyMultiplyDerived() {}\n};\n\nstruct OtherVirtuallyMultiplyDerived: virtual public Base, virtual public OtherBase\n{\n    virtual ~OtherVirtuallyMultiplyDerived() {}\n};\n\nstruct MultiplyVirtuallyDiamondDerived: public VirtuallyMultiplyDerived, public OtherVirtuallyMultiplyDerived\n{\n    virtual ~MultiplyVirtuallyDiamondDerived() {}\n    virtual void f() {}\n    virtual void g() {}\n};\n</code></pre>\n\n<p>and received from G++ (mangled name guide: TI\'s are typeinfos, TV\'s are vtables, and Th\'s and Tv\'s are thunks used to make correct virtual calls in the presence of multiple and/or virtual inheritance):</p>\n\n<pre>\nVtable for Base\n\nBase::_ZTV4Base: 5u entries\n\n0     (int (*)(...))0\n\n8     (int (*)(...))(& _ZTI4Base)\n\n16    0u\n\n24    0u\n\n32    (int (*)(...))__cxa_pure_virtual\n\n\nClass Base\n\n   size=8 align=8\n\n   base size=8 base align=8\n\nBase (0x0x7fd42c0355a0) 0 nearly-empty\n\n    vptr=((& Base::_ZTV4Base) + 16u)\n\n\nVtable for OtherBase\n\nOtherBase::_ZTV9OtherBase: 5u entries\n\n0     (int (*)(...))0\n\n8     (int (*)(...))(& _ZTI9OtherBase)\n\n16    (int (*)(...))OtherBase::~OtherBase\n\n24    (int (*)(...))OtherBase::~OtherBase\n\n32    (int (*)(...))OtherBase::g\n\n\nClass OtherBase\n\n   size=8 align=8\n\n   base size=8 base align=8\n\nOtherBase (0x0x7fd42c035600) 0 nearly-empty\n\n    vptr=((& OtherBase::_ZTV9OtherBase) + 16u)\n\n\nVtable for Derived\n\nDerived::_ZTV7Derived: 5u entries\n\n0     (int (*)(...))0\n\n8     (int (*)(...))(& _ZTI7Derived)\n\n16    (int (*)(...))Derived::~Derived\n\n24    (int (*)(...))Derived::~Derived\n\n32    (int (*)(...))Derived::f\n\n\nClass Derived\n\n   size=8 align=8\n\n   base size=8 base align=8\n\nDerived (0x0x7fd42c02d138) 0 nearly-empty\n\n    vptr=((& Derived::_ZTV7Derived) + 16u)\n\n  Base (0x0x7fd42c035660) 0 nearly-empty\n\n      primary-for Derived (0x0x7fd42c02d138)\n\n\nVtable for MultiplyDerived\n\nMultiplyDerived::_ZTV15MultiplyDerived: 11u entries\n\n0     (int (*)(...))0\n\n8     (int (*)(...))(& _ZTI15MultiplyDerived)\n\n16    (int (*)(...))MultiplyDerived::~MultiplyDerived\n\n24    (int (*)(...))MultiplyDerived::~MultiplyDerived\n\n32    (int (*)(...))MultiplyDerived::f\n\n40    (int (*)(...))MultiplyDerived::g\n\n48    (int (*)(...))-8\n\n56    (int (*)(...))(& _ZTI15MultiplyDerived)\n\n64    (int (*)(...))MultiplyDerived::_ZThn8_N15MultiplyDerivedD1Ev\n\n72    (int (*)(...))MultiplyDerived::_ZThn8_N15MultiplyDerivedD0Ev\n\n80    (int (*)(...))MultiplyDerived::_ZThn8_N15MultiplyDerived1gEv\n\n\nClass MultiplyDerived\n\n   size=16 align=8\n\n   base size=16 base align=8\n\nMultiplyDerived (0x0x7fd42c04aaf0) 0\n\n    vptr=((& MultiplyDerived::_ZTV15MultiplyDerived) + 16u)\n\n  Base (0x0x7fd42c0356c0) 0 nearly-empty\n\n      primary-for MultiplyDerived (0x0x7fd42c04aaf0)\n\n  OtherBase (0x0x7fd42c035720) 8 nearly-empty\n\n      vptr=((& MultiplyDerived::_ZTV15MultiplyDerived) + 64u)\n\n\nVtable for OtherDerived\n\nOtherDerived::_ZTV12OtherDerived: 5u entries\n\n0     (int (*)(...))0\n\n8     (int (*)(...))(& _ZTI12OtherDerived)\n\n16    (int (*)(...))OtherDerived::~OtherDerived\n\n24    (int (*)(...))OtherDerived::~OtherDerived\n\n32    (int (*)(...))OtherDerived::f\n\n\nClass OtherDerived\n\n   size=8 align=8\n\n   base size=8 base align=8\n\nOtherDerived (0x0x7fd42c02d1a0) 0 nearly-empty\n\n    vptr=((& OtherDerived::_ZTV12OtherDerived) + 16u)\n\n  Base (0x0x7fd42c035780) 0 nearly-empty\n\n      primary-for OtherDerived (0x0x7fd42c02d1a0)\n\n\nVtable for DiamondDerived\n\nDiamondDerived::_ZTV14DiamondDerived: 10u entries\n\n0     (int (*)(...))0\n\n8     (int (*)(...))(& _ZTI14DiamondDerived)\n\n16    (int (*)(...))DiamondDerived::~DiamondDerived\n\n24    (int (*)(...))DiamondDerived::~DiamondDerived\n\n32    (int (*)(...))DiamondDerived::f\n\n40    (int (*)(...))-8\n\n48    (int (*)(...))(& _ZTI14DiamondDerived)\n\n56    (int (*)(...))DiamondDerived::_ZThn8_N14DiamondDerivedD1Ev\n\n64    (int (*)(...))DiamondDerived::_ZThn8_N14DiamondDerivedD0Ev\n\n72    (int (*)(...))DiamondDerived::_ZThn8_N14DiamondDerived1fEv\n\n\nClass DiamondDerived\n\n   size=16 align=8\n\n   base size=16 base align=8\n\nDiamondDerived (0x0x7fd42c0625b0) 0\n\n    vptr=((& DiamondDerived::_ZTV14DiamondDerived) + 16u)\n\n  Derived (0x0x7fd42c02d208) 0 nearly-empty\n\n      primary-for DiamondDerived (0x0x7fd42c0625b0)\n\n    Base (0x0x7fd42c0357e0) 0 nearly-empty\n\n        primary-for Derived (0x0x7fd42c02d208)\n\n  OtherDerived (0x0x7fd42c02d270) 8 nearly-empty\n\n      vptr=((& DiamondDerived::_ZTV14DiamondDerived) + 56u)\n\n    Base (0x0x7fd42c035840) 8 nearly-empty\n\n        primary-for OtherDerived (0x0x7fd42c02d270)\n\n\nVtable for VirtuallyDerived\n\nVirtuallyDerived::_ZTV16VirtuallyDerived: 8u entries\n\n0     0u\n\n8     0u\n\n16    0u\n\n24    (int (*)(...))0\n\n32    (int (*)(...))(& _ZTI16VirtuallyDerived)\n\n40    (int (*)(...))VirtuallyDerived::~VirtuallyDerived\n\n48    (int (*)(...))VirtuallyDerived::~VirtuallyDerived\n\n56    (int (*)(...))VirtuallyDerived::f\n\n\nVTT for VirtuallyDerived\n\nVirtuallyDerived::_ZTT16VirtuallyDerived: 2u entries\n\n0     ((& VirtuallyDerived::_ZTV16VirtuallyDerived) + 40u)\n\n8     ((& VirtuallyDerived::_ZTV16VirtuallyDerived) + 40u)\n\n\nClass VirtuallyDerived\n\n   size=8 align=8\n\n   base size=8 base align=8\n\nVirtuallyDerived (0x0x7fd42c02d2d8) 0 nearly-empty\n\n    vptridx=0u vptr=((& VirtuallyDerived::_ZTV16VirtuallyDerived) + 40u)\n\n  Base (0x0x7fd42c0358a0) 0 nearly-empty virtual\n\n      primary-for VirtuallyDerived (0x0x7fd42c02d2d8)\n\n      vptridx=8u vbaseoffset=-40\n\n\nVtable for OtherVirtuallyDerived\n\nOtherVirtuallyDerived::_ZTV21OtherVirtuallyDerived: 8u entries\n\n0     0u\n\n8     0u\n\n16    0u\n\n24    (int (*)(...))0\n\n32    (int (*)(...))(& _ZTI21OtherVirtuallyDerived)\n\n40    (int (*)(...))OtherVirtuallyDerived::~OtherVirtuallyDerived\n\n48    (int (*)(...))OtherVirtuallyDerived::~OtherVirtuallyDerived\n\n56    (int (*)(...))OtherVirtuallyDerived::f\n\n\nVTT for OtherVirtuallyDerived\n\nOtherVirtuallyDerived::_ZTT21OtherVirtuallyDerived: 2u entries\n\n0     ((& OtherVirtuallyDerived::_ZTV21OtherVirtuallyDerived) + 40u)\n\n8     ((& OtherVirtuallyDerived::_ZTV21OtherVirtuallyDerived) + 40u)\n\n\nClass OtherVirtuallyDerived\n\n   size=8 align=8\n\n   base size=8 base align=8\n\nOtherVirtuallyDerived (0x0x7fd42c02d340) 0 nearly-empty\n\n    vptridx=0u vptr=((& OtherVirtuallyDerived::_ZTV21OtherVirtuallyDerived) + 40u)\n\n  Base (0x0x7fd42c035900) 0 nearly-empty virtual\n\n      primary-for OtherVirtuallyDerived (0x0x7fd42c02d340)\n\n      vptridx=8u vbaseoffset=-40\n\n\nVtable for VirtuallyDiamondDerived\n\nVirtuallyDiamondDerived::_ZTV23VirtuallyDiamondDerived: 16u entries\n\n0     0u\n\n8     0u\n\n16    0u\n\n24    (int (*)(...))0\n\n32    (int (*)(...))(& _ZTI23VirtuallyDiamondDerived)\n\n40    (int (*)(...))VirtuallyDiamondDerived::~VirtuallyDiamondDerived\n\n48    (int (*)(...))VirtuallyDiamondDerived::~VirtuallyDiamondDerived\n\n56    (int (*)(...))VirtuallyDiamondDerived::f\n\n64    18446744073709551608u\n\n72    18446744073709551608u\n\n80    18446744073709551608u\n\n88    (int (*)(...))-8\n\n96    (int (*)(...))(& _ZTI23VirtuallyDiamondDerived)\n\n104   (int (*)(...))VirtuallyDiamondDerived::_ZThn8_N23VirtuallyDiamondDerivedD1Ev\n\n112   (int (*)(...))VirtuallyDiamondDerived::_ZThn8_N23VirtuallyDiamondDerivedD0Ev\n\n120   (int (*)(...))VirtuallyDiamondDerived::_ZThn8_N23VirtuallyDiamondDerived1fEv\n\n\nConstruction vtable for VirtuallyDerived (0x0x7fd42c02d3a8 instance) in VirtuallyDiamondDerived\n\nVirtuallyDiamondDerived::_ZTC23VirtuallyDiamondDerived0_16VirtuallyDerived: 8u entries\n\n0     0u\n\n8     0u\n\n16    0u\n\n24    (int (*)(...))0\n\n32    (int (*)(...))(& _ZTI16VirtuallyDerived)\n\n40    0u\n\n48    0u\n\n56    (int (*)(...))VirtuallyDerived::f\n\n\nConstruction vtable for OtherVirtuallyDerived (0x0x7fd42c02d410 instance) in VirtuallyDiamondDerived\n\nVirtuallyDiamondDerived::_ZTC23VirtuallyDiamondDerived8_21OtherVirtuallyDerived: 15u entries\n\n0     18446744073709551608u\n\n8     0u\n\n16    0u\n\n24    (int (*)(...))0\n\n32    (int (*)(...))(& _ZTI21OtherVirtuallyDerived)\n\n40    0u\n\n48    0u\n\n56    (int (*)(...))OtherVirtuallyDerived::f\n\n64    8u\n\n72    8u\n\n80    (int (*)(...))8\n\n88    (int (*)(...))(& _ZTI21OtherVirtuallyDerived)\n\n96    0u\n\n104   0u\n\n112   (int (*)(...))OtherVirtuallyDerived::_ZTv0_n32_N21OtherVirtuallyDerived1fEv\n\n\nVTT for VirtuallyDiamondDerived\n\nVirtuallyDiamondDerived::_ZTT23VirtuallyDiamondDerived: 7u entries\n\n0     ((& VirtuallyDiamondDerived::_ZTV23VirtuallyDiamondDerived) + 40u)\n\n8     ((& VirtuallyDiamondDerived::_ZTC23VirtuallyDiamondDerived0_16VirtuallyDerived) + 40u)\n\n16    ((& VirtuallyDiamondDerived::_ZTC23VirtuallyDiamondDerived0_16VirtuallyDerived) + 40u)\n\n24    ((& VirtuallyDiamondDerived::_ZTC23VirtuallyDiamondDerived8_21OtherVirtuallyDerived) + 40u)\n\n32    ((& VirtuallyDiamondDerived::_ZTC23VirtuallyDiamondDerived8_21OtherVirtuallyDerived) + 96u)\n\n40    ((& VirtuallyDiamondDerived::_ZTV23VirtuallyDiamondDerived) + 40u)\n\n48    ((& VirtuallyDiamondDerived::_ZTV23VirtuallyDiamondDerived) + 104u)\n\n\nClass VirtuallyDiamondDerived\n\n   size=16 align=8\n\n   base size=16 base align=8\n\nVirtuallyDiamondDerived (0x0x7fd42c07e460) 0\n\n    vptridx=0u vptr=((& VirtuallyDiamondDerived::_ZTV23VirtuallyDiamondDerived) + 40u)\n\n  VirtuallyDerived (0x0x7fd42c02d3a8) 0 nearly-empty\n\n      primary-for VirtuallyDiamondDerived (0x0x7fd42c07e460)\n\n      subvttidx=8u\n\n    Base (0x0x7fd42c035960) 0 nearly-empty virtual\n\n        primary-for VirtuallyDerived (0x0x7fd42c02d3a8)\n\n        vptridx=40u vbaseoffset=-40\n\n  OtherVirtuallyDerived (0x0x7fd42c02d410) 8 nearly-empty\n\n      lost-primary\n\n      subvttidx=24u vptridx=48u vptr=((& VirtuallyDiamondDerived::_ZTV23VirtuallyDiamondDerived) + 104u)\n\n    Base (0x0x7fd42c035960) alternative-path\n\n\nVtable for DoublyVirtuallyDiamondDerived\n\nDoublyVirtuallyDiamondDerived::_ZTV29DoublyVirtuallyDiamondDerived: 18u entries\n\n0     8u\n\n8     0u\n\n16    0u\n\n24    0u\n\n32    0u\n\n40    (int (*)(...))0\n\n48    (int (*)(...))(& _ZTI29DoublyVirtuallyDiamondDerived)\n\n56    (int (*)(...))DoublyVirtuallyDiamondDerived::~DoublyVirtuallyDiamondDerived\n\n64    (int (*)(...))DoublyVirtuallyDiamondDerived::~DoublyVirtuallyDiamondDerived\n\n72    (int (*)(...))DoublyVirtuallyDiamondDerived::f\n\n80    18446744073709551608u\n\n88    18446744073709551608u\n\n96    18446744073709551608u\n\n104   (int (*)(...))-8\n\n112   (int (*)(...))(& _ZTI29DoublyVirtuallyDiamondDerived)\n\n120   (int (*)(...))DoublyVirtuallyDiamondDerived::_ZTv0_n24_N29DoublyVirtuallyDiamondDerivedD1Ev\n\n128   (int (*)(...))DoublyVirtuallyDiamondDerived::_ZTv0_n24_N29DoublyVirtuallyDiamondDerivedD0Ev\n\n136   (int (*)(...))DoublyVirtuallyDiamondDerived::_ZTv0_n32_N29DoublyVirtuallyDiamondDerived1fEv\n\n\nConstruction vtable for VirtuallyDerived in DoublyVirtuallyDiamondDerived\n\nDoublyVirtuallyDiamondDerived::_ZTC29DoublyVirtuallyDiamondDerived0_16VirtuallyDerived: 8u entries\n\n0     0u\n\n8     0u\n\n16    0u\n\n24    (int (*)(...))0\n\n32    (int (*)(...))(& _ZTI16VirtuallyDerived)\n\n40    0u\n\n48    0u\n\n56    (int (*)(...))VirtuallyDerived::f\n\n\nConstruction vtable for OtherVirtuallyDerived in DoublyVirtuallyDiamondDerived\n\nDoublyVirtuallyDiamondDerived::_ZTC29DoublyVirtuallyDiamondDerived8_21OtherVirtuallyDerived: 15u entries\n\n0     18446744073709551608u\n\n8     0u\n\n16    0u\n\n24    (int (*)(...))0\n\n32    (int (*)(...))(& _ZTI21OtherVirtuallyDerived)\n\n40    0u\n\n48    0u\n\n56    (int (*)(...))OtherVirtuallyDerived::f\n\n64    8u\n\n72    8u\n\n80    (int (*)(...))8\n\n88    (int (*)(...))(& _ZTI21OtherVirtuallyDerived)\n\n96    0u\n\n104   0u\n\n112   (int (*)(...))OtherVirtuallyDerived::_ZTv0_n32_N21OtherVirtuallyDerived1fEv\n\n\nVTT for DoublyVirtuallyDiamondDerived\n\nDoublyVirtuallyDiamondDerived::_ZTT29DoublyVirtuallyDiamondDerived: 8u entries\n\n0     ((& DoublyVirtuallyDiamondDerived::_ZTV29DoublyVirtuallyDiamondDerived) + 56u)\n\n8     ((& DoublyVirtuallyDiamondDerived::_ZTV29DoublyVirtuallyDiamondDerived) + 56u)\n\n16    ((& DoublyVirtuallyDiamondDerived::_ZTV29DoublyVirtuallyDiamondDerived) + 56u)\n\n24    ((& DoublyVirtuallyDiamondDerived::_ZTV29DoublyVirtuallyDiamondDerived) + 120u)\n\n32    ((& DoublyVirtuallyDiamondDerived::_ZTC29DoublyVirtuallyDiamondDerived0_16VirtuallyDerived) + 40u)\n\n40    ((& DoublyVirtuallyDiamondDerived::_ZTC29DoublyVirtuallyDiamondDerived0_16VirtuallyDerived) + 40u)\n\n48    ((& DoublyVirtuallyDiamondDerived::_ZTC29DoublyVirtuallyDiamondDerived8_21OtherVirtuallyDerived) + 40u)\n\n56    ((& DoublyVirtuallyDiamondDerived::_ZTC29DoublyVirtuallyDiamondDerived8_21OtherVirtuallyDerived) + 96u)\n\n\nClass DoublyVirtuallyDiamondDerived\n\n   size=16 align=8\n\n   base size=8 base align=8\n\nDoublyVirtuallyDiamondDerived (0x0x7fd42c07ea10) 0 nearly-empty\n\n    vptridx=0u vptr=((& DoublyVirtuallyDiamondDerived::_ZTV29DoublyVirtuallyDiamondDerived) + 56u)\n\n  VirtuallyDerived (0x0x7fd42c02d478) 0 nearly-empty virtual\n\n      primary-for DoublyVirtuallyDiamondDerived (0x0x7fd42c07ea10)\n\n      subvttidx=32u vptridx=8u vbaseoffset=-48\n\n    Base (0x0x7fd42c035a80) 0 nearly-empty virtual\n\n        primary-for VirtuallyDerived (0x0x7fd42c02d478)\n\n        vptridx=16u vbaseoffset=-40\n\n  OtherVirtuallyDerived (0x0x7fd42c02d4e0) 8 nearly-empty virtual\n\n      lost-primary\n\n      subvttidx=48u vptridx=24u vbaseoffset=-56 vptr=((& DoublyVirtuallyDiamondDerived::_ZTV29DoublyVirtuallyDiamondDerived) + 120u)\n\n    Base (0x0x7fd42c035a80) alternative-path\n\n\nVtable for MixedVirtuallyDerived\n\nMixedVirtuallyDerived::_ZTV21MixedVirtuallyDerived: 13u entries\n\n0     8u\n\n8     (int (*)(...))0\n\n16    (int (*)(...))(& _ZTI21MixedVirtuallyDerived)\n\n24    0u\n\n32    0u\n\n40    (int (*)(...))OtherBase::g\n\n48    0u\n\n56    18446744073709551608u\n\n64    (int (*)(...))-8\n\n72    (int (*)(...))(& _ZTI21MixedVirtuallyDerived)\n\n80    0u\n\n88    0u\n\n96    (int (*)(...))__cxa_pure_virtual\n\n\nVTT for MixedVirtuallyDerived\n\nMixedVirtuallyDerived::_ZTT21MixedVirtuallyDerived: 2u entries\n\n0     ((& MixedVirtuallyDerived::_ZTV21MixedVirtuallyDerived) + 24u)\n\n8     ((& MixedVirtuallyDerived::_ZTV21MixedVirtuallyDerived) + 80u)\n\n\nClass MixedVirtuallyDerived\n\n   size=16 align=8\n\n   base size=8 base align=8\n\nMixedVirtuallyDerived (0x0x7fd42c07eee0) 0 nearly-empty\n\n    vptridx=0u vptr=((& MixedVirtuallyDerived::_ZTV21MixedVirtuallyDerived) + 24u)\n\n  Base (0x0x7fd42c035c60) 8 nearly-empty virtual\n\n      vptridx=8u vbaseoffset=-24 vptr=((& MixedVirtuallyDerived::_ZTV21MixedVirtuallyDerived) + 80u)\n\n  OtherBase (0x0x7fd42c035cc0) 0 nearly-empty\n\n      primary-for MixedVirtuallyDerived (0x0x7fd42c07eee0)\n\n\nVtable for MixedVirtuallyDiamondDerived\n\nMixedVirtuallyDiamondDerived::_ZTV28MixedVirtuallyDiamondDerived: 15u entries\n\n0     0u\n\n8     0u\n\n16    0u\n\n24    (int (*)(...))0\n\n32    (int (*)(...))(& _ZTI28MixedVirtuallyDiamondDerived)\n\n40    (int (*)(...))MixedVirtuallyDiamondDerived::~MixedVirtuallyDiamondDerived\n\n48    (int (*)(...))MixedVirtuallyDiamondDerived::~MixedVirtuallyDiamondDerived\n\n56    (int (*)(...))MixedVirtuallyDiamondDerived::f\n\n64    (int (*)(...))MixedVirtuallyDiamondDerived::g\n\n72    18446744073709551608u\n\n80    (int (*)(...))-8\n\n88    (int (*)(...))(& _ZTI28MixedVirtuallyDiamondDerived)\n\n96    (int (*)(...))MixedVirtuallyDiamondDerived::_ZThn8_N28MixedVirtuallyDiamondDerivedD1Ev\n\n104   (int (*)(...))MixedVirtuallyDiamondDerived::_ZThn8_N28MixedVirtuallyDiamondDerivedD0Ev\n\n112   (int (*)(...))MixedVirtuallyDiamondDerived::_ZThn8_N28MixedVirtuallyDiamondDerived1gEv\n\n\nConstruction vtable for VirtuallyDerived (0x0x7fd42c02d750 instance) in MixedVirtuallyDiamondDerived\n\nMixedVirtuallyDiamondDerived::_ZTC28MixedVirtuallyDiamondDerived0_16VirtuallyDerived: 8u entries\n\n0     0u\n\n8     0u\n\n16    0u\n\n24    (int (*)(...))0\n\n32    (int (*)(...))(& _ZTI16VirtuallyDerived)\n\n40    0u\n\n48    0u\n\n56    (int (*)(...))VirtuallyDerived::f\n\n\nConstruction vtable for MixedVirtuallyDerived (0x0x7fd42c0b5380 instance) in MixedVirtuallyDiamondDerived\n\nMixedVirtuallyDiamondDerived::_ZTC28MixedVirtuallyDiamondDerived8_21MixedVirtuallyDerived: 13u entries\n\n0     18446744073709551608u\n\n8     (int (*)(...))0\n\n16    (int (*)(...))(& _ZTI21MixedVirtuallyDerived)\n\n24    0u\n\n32    0u\n\n40    (int (*)(...))OtherBase::g\n\n48    0u\n\n56    8u\n\n64    (int (*)(...))8\n\n72    (int (*)(...))(& _ZTI21MixedVirtuallyDerived)\n\n80    0u\n\n88    0u\n\n96    (int (*)(...))__cxa_pure_virtual\n\n\nVTT for MixedVirtuallyDiamondDerived\n\nMixedVirtuallyDiamondDerived::_ZTT28MixedVirtuallyDiamondDerived: 7u entries\n\n0     ((& MixedVirtuallyDiamondDerived::_ZTV28MixedVirtuallyDiamondDerived) + 40u)\n\n8     ((& MixedVirtuallyDiamondDerived::_ZTC28MixedVirtuallyDiamondDerived0_16VirtuallyDerived) + 40u)\n\n16    ((& MixedVirtuallyDiamondDerived::_ZTC28MixedVirtuallyDiamondDerived0_16VirtuallyDerived) + 40u)\n\n24    ((& MixedVirtuallyDiamondDerived::_ZTC28MixedVirtuallyDiamondDerived8_21MixedVirtuallyDerived) + 24u)\n\n32    ((& MixedVirtuallyDiamondDerived::_ZTC28MixedVirtuallyDiamondDerived8_21MixedVirtuallyDerived) + 80u)\n\n40    ((& MixedVirtuallyDiamondDerived::_ZTV28MixedVirtuallyDiamondDerived) + 40u)\n\n48    ((& MixedVirtuallyDiamondDerived::_ZTV28MixedVirtuallyDiamondDerived) + 96u)\n\n\nClass MixedVirtuallyDiamondDerived\n\n   size=16 align=8\n\n   base size=16 base align=8\n\nMixedVirtuallyDiamondDerived (0x0x7fd42c0b5310) 0\n\n    vptridx=0u vptr=((& MixedVirtuallyDiamondDerived::_ZTV28MixedVirtuallyDiamondDerived) + 40u)\n\n  VirtuallyDerived (0x0x7fd42c02d750) 0 nearly-empty\n\n      primary-for MixedVirtuallyDiamondDerived (0x0x7fd42c0b5310)\n\n      subvttidx=8u\n\n    Base (0x0x7fd42c035d20) 0 nearly-empty virtual\n\n        primary-for VirtuallyDerived (0x0x7fd42c02d750)\n\n        vptridx=40u vbaseoffset=-40\n\n  MixedVirtuallyDerived (0x0x7fd42c0b5380) 8 nearly-empty\n\n      subvttidx=24u vptridx=48u vptr=((& MixedVirtuallyDiamondDerived::_ZTV28MixedVirtuallyDiamondDerived) + 96u)\n\n    Base (0x0x7fd42c035d20) alternative-path\n\n    OtherBase (0x0x7fd42c035d80) 8 nearly-empty\n\n        primary-for MixedVirtuallyDerived (0x0x7fd42c0b5380)\n\n\nVtable for VirtuallyMultiplyDerived\n\nVirtuallyMultiplyDerived::_ZTV24VirtuallyMultiplyDerived: 16u entries\n\n0     8u\n\n8     0u\n\n16    0u\n\n24    0u\n\n32    (int (*)(...))0\n\n40    (int (*)(...))(& _ZTI24VirtuallyMultiplyDerived)\n\n48    0u\n\n56    0u\n\n64    (int (*)(...))__cxa_pure_virtual\n\n72    0u\n\n80    18446744073709551608u\n\n88    (int (*)(...))-8\n\n96    (int (*)(...))(& _ZTI24VirtuallyMultiplyDerived)\n\n104   0u\n\n112   0u\n\n120   (int (*)(...))OtherBase::g\n\n\nVTT for VirtuallyMultiplyDerived\n\nVirtuallyMultiplyDerived::_ZTT24VirtuallyMultiplyDerived: 3u entries\n\n0     ((& VirtuallyMultiplyDerived::_ZTV24VirtuallyMultiplyDerived) + 48u)\n\n8     ((& VirtuallyMultiplyDerived::_ZTV24VirtuallyMultiplyDerived) + 48u)\n\n16    ((& VirtuallyMultiplyDerived::_ZTV24VirtuallyMultiplyDerived) + 104u)\n\n\nClass VirtuallyMultiplyDerived\n\n   size=16 align=8\n\n   base size=8 base align=8\n\nVirtuallyMultiplyDerived (0x0x7fd42c0b59a0) 0 nearly-empty\n\n    vptridx=0u vptr=((& VirtuallyMultiplyDerived::_ZTV24VirtuallyMultiplyDerived) + 48u)\n\n  Base (0x0x7fd42c035e40) 0 nearly-empty virtual\n\n      primary-for VirtuallyMultiplyDerived (0x0x7fd42c0b59a0)\n\n      vptridx=8u vbaseoffset=-40\n\n  OtherBase (0x0x7fd42c035ea0) 8 nearly-empty virtual\n\n      vptridx=16u vbaseoffset=-48 vptr=((& VirtuallyMultiplyDerived::_ZTV24VirtuallyMultiplyDerived) + 104u)\n\n\nVtable for OtherVirtuallyMultiplyDerived\n\nOtherVirtuallyMultiplyDerived::_ZTV29OtherVirtuallyMultiplyDerived: 16u entries\n\n0     8u\n\n8     0u\n\n16    0u\n\n24    0u\n\n32    (int (*)(...))0\n\n40    (int (*)(...))(& _ZTI29OtherVirtuallyMultiplyDerived)\n\n48    0u\n\n56    0u\n\n64    (int (*)(...))__cxa_pure_virtual\n\n72    0u\n\n80    18446744073709551608u\n\n88    (int (*)(...))-8\n\n96    (int (*)(...))(& _ZTI29OtherVirtuallyMultiplyDerived)\n\n104   0u\n\n112   0u\n\n120   (int (*)(...))OtherBase::g\n\n\nVTT for OtherVirtuallyMultiplyDerived\n\nOtherVirtuallyMultiplyDerived::_ZTT29OtherVirtuallyMultiplyDerived: 3u entries\n\n0     ((& OtherVirtuallyMultiplyDerived::_ZTV29OtherVirtuallyMultiplyDerived) + 48u)\n\n8     ((& OtherVirtuallyMultiplyDerived::_ZTV29OtherVirtuallyMultiplyDerived) + 48u)\n\n16    ((& OtherVirtuallyMultiplyDerived::_ZTV29OtherVirtuallyMultiplyDerived) + 104u)\n\n\nClass OtherVirtuallyMultiplyDerived\n\n   size=16 align=8\n\n   base size=8 base align=8\n\nOtherVirtuallyMultiplyDerived (0x0x7fd42c0b5d90) 0 nearly-empty\n\n    vptridx=0u vptr=((& OtherVirtuallyMultiplyDerived::_ZTV29OtherVirtuallyMultiplyDerived) + 48u)\n\n  Base (0x0x7fd42c035f00) 0 nearly-empty virtual\n\n      primary-for OtherVirtuallyMultiplyDerived (0x0x7fd42c0b5d90)\n\n      vptridx=8u vbaseoffset=-40\n\n  OtherBase (0x0x7fd42c035f60) 8 nearly-empty virtual\n\n      vptridx=16u vbaseoffset=-48 vptr=((& OtherVirtuallyMultiplyDerived::_ZTV29OtherVirtuallyMultiplyDerived) + 104u)\n\n\nVtable for MultiplyVirtuallyDiamondDerived\n\nMultiplyVirtuallyDiamondDerived::_ZTV31MultiplyVirtuallyDiamondDerived: 26u entries\n\n0     16u\n\n8     0u\n\n16    0u\n\n24    0u\n\n32    (int (*)(...))0\n\n40    (int (*)(...))(& _ZTI31MultiplyVirtuallyDiamondDerived)\n\n48    (int (*)(...))MultiplyVirtuallyDiamondDerived::~MultiplyVirtuallyDiamondDerived\n\n56    (int (*)(...))MultiplyVirtuallyDiamondDerived::~MultiplyVirtuallyDiamondDerived\n\n64    (int (*)(...))MultiplyVirtuallyDiamondDerived::f\n\n72    (int (*)(...))MultiplyVirtuallyDiamondDerived::g\n\n80    8u\n\n88    18446744073709551608u\n\n96    18446744073709551608u\n\n104   18446744073709551608u\n\n112   (int (*)(...))-8\n\n120   (int (*)(...))(& _ZTI31MultiplyVirtuallyDiamondDerived)\n\n128   (int (*)(...))MultiplyVirtuallyDiamondDerived::_ZThn8_N31MultiplyVirtuallyDiamondDerivedD1Ev\n\n136   (int (*)(...))MultiplyVirtuallyDiamondDerived::_ZThn8_N31MultiplyVirtuallyDiamondDerivedD0Ev\n\n144   0u\n\n152   18446744073709551600u\n\n160   18446744073709551600u\n\n168   (int (*)(...))-16\n\n176   (int (*)(...))(& _ZTI31MultiplyVirtuallyDiamondDerived)\n\n184   (int (*)(...))MultiplyVirtuallyDiamondDerived::_ZTv0_n24_N31MultiplyVirtuallyDiamondDerivedD1Ev\n\n192   (int (*)(...))MultiplyVirtuallyDiamondDerived::_ZTv0_n24_N31MultiplyVirtuallyDiamondDerivedD0Ev\n\n200   (int (*)(...))MultiplyVirtuallyDiamondDerived::_ZTv0_n32_N31MultiplyVirtuallyDiamondDerived1gEv\n\n\nConstruction vtable for VirtuallyMultiplyDerived (0x0x7fd42bcdf230 instance) in MultiplyVirtuallyDiamondDerived\n\nMultiplyVirtuallyDiamondDerived::_ZTC31MultiplyVirtuallyDiamondDerived0_24VirtuallyMultiplyDerived: 16u entries\n\n0     16u\n\n8     0u\n\n16    0u\n\n24    0u\n\n32    (int (*)(...))0\n\n40    (int (*)(...))(& _ZTI24VirtuallyMultiplyDerived)\n\n48    0u\n\n56    0u\n\n64    (int (*)(...))__cxa_pure_virtual\n\n72    0u\n\n80    18446744073709551600u\n\n88    (int (*)(...))-16\n\n96    (int (*)(...))(& _ZTI24VirtuallyMultiplyDerived)\n\n104   0u\n\n112   0u\n\n120   (int (*)(...))OtherBase::g\n\n\nConstruction vtable for OtherVirtuallyMultiplyDerived (0x0x7fd42bcdf2a0 instance) in MultiplyVirtuallyDiamondDerived\n\nMultiplyVirtuallyDiamondDerived::_ZTC31MultiplyVirtuallyDiamondDerived8_29OtherVirtuallyMultiplyDerived: 23u entries\n\n0     8u\n\n8     18446744073709551608u\n\n16    18446744073709551608u\n\n24    0u\n\n32    (int (*)(...))0\n\n40    (int (*)(...))(& _ZTI29OtherVirtuallyMultiplyDerived)\n\n48    0u\n\n56    0u\n\n64    (int (*)(...))__cxa_pure_virtual\n\n72    0u\n\n80    8u\n\n88    (int (*)(...))8\n\n96    (int (*)(...))(& _ZTI29OtherVirtuallyMultiplyDerived)\n\n104   0u\n\n112   0u\n\n120   (int (*)(...))__cxa_pure_virtual\n\n128   0u\n\n136   18446744073709551608u\n\n144   (int (*)(...))-8\n\n152   (int (*)(...))(& _ZTI29OtherVirtuallyMultiplyDerived)\n\n160   0u\n\n168   0u\n\n176   (int (*)(...))OtherBase::g\n\n\nVTT for MultiplyVirtuallyDiamondDerived\n\nMultiplyVirtuallyDiamondDerived::_ZTT31MultiplyVirtuallyDiamondDerived: 10u entries\n\n0     ((& MultiplyVirtuallyDiamondDerived::_ZTV31MultiplyVirtuallyDiamondDerived) + 48u)\n\n8     ((& MultiplyVirtuallyDiamondDerived::_ZTC31MultiplyVirtuallyDiamondDerived0_24VirtuallyMultiplyDerived) + 48u)\n\n16    ((& MultiplyVirtuallyDiamondDerived::_ZTC31MultiplyVirtuallyDiamondDerived0_24VirtuallyMultiplyDerived) + 48u)\n\n24    ((& MultiplyVirtuallyDiamondDerived::_ZTC31MultiplyVirtuallyDiamondDerived0_24VirtuallyMultiplyDerived) + 104u)\n\n32    ((& MultiplyVirtuallyDiamondDerived::_ZTC31MultiplyVirtuallyDiamondDerived8_29OtherVirtuallyMultiplyDerived) + 48u)\n\n40    ((& MultiplyVirtuallyDiamondDerived::_ZTC31MultiplyVirtuallyDiamondDerived8_29OtherVirtuallyMultiplyDerived) + 104u)\n\n48    ((& MultiplyVirtuallyDiamondDerived::_ZTC31MultiplyVirtuallyDiamondDerived8_29OtherVirtuallyMultiplyDerived) + 160u)\n\n56    ((& MultiplyVirtuallyDiamondDerived::_ZTV31MultiplyVirtuallyDiamondDerived) + 48u)\n\n64    ((& MultiplyVirtuallyDiamondDerived::_ZTV31MultiplyVirtuallyDiamondDerived) + 184u)\n\n72    ((& MultiplyVirtuallyDiamondDerived::_ZTV31MultiplyVirtuallyDiamondDerived) + 128u)\n\n\nClass MultiplyVirtuallyDiamondDerived\n\n   size=24 align=8\n\n   base size=16 base align=8\n\nMultiplyVirtuallyDiamondDerived (0x0x7fd42bcdf1c0) 0\n\n    vptridx=0u vptr=((& MultiplyVirtuallyDiamondDerived::_ZTV31MultiplyVirtuallyDiamondDerived) + 48u)\n\n  VirtuallyMultiplyDerived (0x0x7fd42bcdf230) 0 nearly-empty\n\n      primary-for MultiplyVirtuallyDiamondDerived (0x0x7fd42bcdf1c0)\n\n      subvttidx=8u\n\n    Base (0x0x7fd42bce2000) 0 nearly-empty virtual\n\n        primary-for VirtuallyMultiplyDerived (0x0x7fd42bcdf230)\n\n        vptridx=56u vbaseoffset=-40\n\n    OtherBase (0x0x7fd42bce2060) 16 nearly-empty virtual\n\n        vptridx=64u vbaseoffset=-48 vptr=((& MultiplyVirtuallyDiamondDerived::_ZTV31MultiplyVirtuallyDiamondDerived) + 184u)\n\n  OtherVirtuallyMultiplyDerived (0x0x7fd42bcdf2a0) 8 nearly-empty\n\n      lost-primary\n\n      subvttidx=32u vptridx=72u vptr=((& MultiplyVirtuallyDiamondDerived::_ZTV31MultiplyVirtuallyDiamondDerived) + 128u)\n\n    Base (0x0x7fd42bce2000) alternative-path\n\n    OtherBase (0x0x7fd42bce2060) alternative-path\n</pre>\n'}]
['https://Stackoverflow.com/questions/70682', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/8516/']