`this` pointer at runtime.
Warning(s): class NonStandardDerived size(16):
+---
0 | {vfptr}
| +--- (base class StandardBase)
8 | | i
| +---
| <alignment member> (size=4)
+---
NonStandardDerived::$vftable@:
| &NonStandardDerived_meta
| 0
0 | &NonStandardDerived::f
NonStandardDerived::f this adjustor: 0
class ?$is_standard_layout@UNonStandardDerived@@ size(1):
+---
| +--- (base class ?$_Cat_base@$0A@)
| | +--- (base class ?$integral_constant@_N$0A@)
| | +---
| +---
+---
class VDerived size(8):
+---
0 | {vbptr}
+---
+--- (virtual base VBase)
+---
VDerived::$vbtable@:
0 | 0
1 | 8 (VDerivedd(VDerived+0)VBase)
vbi: class offset o.vbptr o.vbte fVtorDisp
VBase 8 0 4 0
class Derived size(40):
+---
| +--- (base class Base1)
0 | | {vfptr}
8 | | i
| | <alignment member> (size=4)
| +---
| +--- (base class Base2)
16 | | {vfptr}
24 | | s
| | <alignment member> (size=6)
| +---
32 | b
| <alignment member> (size=7)
+---
Derived::$vftable@Base1@:
| &Derived_meta
| 0
0 | &Derived::address
Derived::$vftable@Base2@:
| -16
0 | &thunk: this-=16; goto Derived::address
Derived::address this adjustor: 0
/LIBPATH:C:\boost_1_60_0\stage\lib
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23506 for x64
---
Control example: Two distinct instances of simple class.
s[0] address: 0x000000191466f7f8
* s[0] this pointer: 0x000000191466f7f8
s[1] address: 0x000000191466f7fc
* s[1] this pointer: 0x000000191466f7fc
Derived class with non-standard layout:
* n address: 0x000000191466f810
* n this pointer: 0x000000191466f810
* n this pointer (as StandardBase): 0x000000191466f818
* n this pointer (as NonStandardDerived): 0x000000191466f810
Derived class with virtual base:
* v address: 0x000000191466f7f0
* v this pointer: 0x000000191466f7f0
* this pointer (as VBase): 0x000000191466f7f8
* this pointer (as VDerived): 0x000000191466f7f0
Derived class with multiple inheritance:
(Calling address() through a static_cast reference, then the appropriate raw_address().)
* d address: 0x000000191466f820
* d this pointer: 0x000000191466f820 (0x000000191466f820)
* d this pointer (as Base1): 0x000000191466f820 (0x000000191466f820)
* d this pointer (as Base2): 0x000000191466f820 (0x000000191466f830)
* d this pointer (as Derived): 0x000000191466f820 (0x000000191466f820)
|
|