|
|
|
|
|
by alternatetwo
1588 days ago
|
|
FYI, MSVC doesn't do this. I use this same hack in a project where I need access to private/protected members in the current stage, and memory layouts need to match ... You gave me a bit of a heart attack there. mingw gcc (11.2.0) does have the same 8 vs 12 difference. |
|
https://godbolt.org/z/ddqd3vr5x
Notice the call to `?foo@A@@AEAAXXZ` in one compilation and `?foo@A@@QEAAXXZ` in the other, supposedly to the same function. You might get fun linker errors this way, possibly nothing nastier though.