Created
December 31, 2012 23:21
-
-
Save ddustin/4423771 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Class foo | |
size=4 align=4 | |
base size=4 base align=4 | |
foo (0x140d45620) 0 | |
Vtable for bar | |
bar::_ZTV3bar: 5u entries | |
0 12u | |
8 (int (*)(...))0 | |
16 (int (*)(...))(& _ZTI3bar) | |
24 bar::~bar | |
32 bar::~bar | |
VTT for bar | |
bar::_ZTT3bar: 1u entries | |
0 ((& bar::_ZTV3bar) + 24u) | |
Class bar | |
size=16 align=8 | |
base size=12 base align=8 | |
bar (0x140d45690) 0 | |
vptridx=0u vptr=((& bar::_ZTV3bar) + 24u) | |
foo (0x140d45700) 12 virtual | |
vbaseoffset=-0x00000000000000018 | |
Vtable for test | |
test::_ZTV4test: 5u entries | |
0 16u | |
8 (int (*)(...))0 | |
16 (int (*)(...))(& _ZTI4test) | |
24 test::~test | |
32 test::~test | |
Construction vtable for bar (0x140d45d90 instance) in test | |
test::_ZTC4test0_3bar: 5u entries | |
0 16u | |
8 (int (*)(...))0 | |
16 (int (*)(...))(& _ZTI3bar) | |
24 bar::~bar | |
32 bar::~bar | |
VTT for test | |
test::_ZTT4test: 2u entries | |
0 ((& test::_ZTV4test) + 24u) | |
8 ((& test::_ZTC4test0_3bar) + 24u) | |
Class test | |
size=24 align=8 | |
base size=16 base align=8 | |
test (0x140f1f800) 0 | |
vptridx=0u vptr=((& test::_ZTV4test) + 24u) | |
foo (0x140d45d20) 16 virtual | |
vbaseoffset=-0x00000000000000018 | |
bar (0x140d45d90) 0 | |
primary-for test (0x140f1f800) | |
subvttidx=8u | |
foo (0x140d45d20) alternative-path | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Class foo | |
size=4 align=4 | |
base size=4 base align=4 | |
foo (0x140d45620) 0 | |
Vtable for bar | |
bar::_ZTV3bar: 5u entries | |
0 12u | |
8 (int (*)(...))0 | |
16 (int (*)(...))(& _ZTI3bar) | |
24 bar::~bar | |
32 bar::~bar | |
VTT for bar | |
bar::_ZTT3bar: 1u entries | |
0 ((& bar::_ZTV3bar) + 24u) | |
Class bar | |
size=16 align=8 | |
base size=12 base align=8 | |
bar (0x140d45690) 0 | |
vptridx=0u vptr=((& bar::_ZTV3bar) + 24u) | |
foo (0x140d45700) 12 virtual | |
vbaseoffset=-0x00000000000000018 | |
Vtable for test | |
test::_ZTV4test: 5u entries | |
0 16u | |
8 (int (*)(...))0 | |
16 (int (*)(...))(& _ZTI4test) | |
24 test::~test | |
32 test::~test | |
Construction vtable for bar (0x140d45d90 instance) in test | |
test::_ZTC4test0_3bar: 5u entries | |
0 16u | |
8 (int (*)(...))0 | |
16 (int (*)(...))(& _ZTI3bar) | |
24 bar::~bar | |
32 bar::~bar | |
VTT for test | |
test::_ZTT4test: 2u entries | |
0 ((& test::_ZTV4test) + 24u) | |
8 ((& test::_ZTC4test0_3bar) + 24u) | |
Class test | |
size=24 align=8 | |
base size=16 base align=8 | |
test (0x140f1f800) 0 | |
vptridx=0u vptr=((& test::_ZTV4test) + 24u) | |
foo (0x140d45d20) 16 virtual | |
vbaseoffset=-0x00000000000000018 | |
bar (0x140d45d90) 0 | |
primary-for test (0x140f1f800) | |
subvttidx=8u | |
foo (0x140d45d20) alternative-path | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if FIX_DIAMOND_INHERITENCE | |
#define VIRTUAL_INHER virtual | |
#else | |
#define VIRTUAL_INHER | |
#endif | |
struct foo | |
{ | |
int i; | |
}; | |
struct bar : public VIRTUAL_INHER foo | |
{ | |
int j; | |
virtual ~bar() {} | |
}; | |
struct test : public VIRTUAL_INHER foo, public bar | |
{ | |
int k; | |
}; | |
int main() | |
{ | |
test t; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment