Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Struct packing
//Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23506 for x64 #include <iostream> #include <Windows.h> struct Before { bool b1; void* p1; void* p2; UINT u1; bool b2; bool b3; bool b4; bool b5; bool b6; }; struct After { void* p1; void* p2; UINT u1; bool b1; bool b2; bool b3; bool b4; bool b5; bool b6; }; int main() { std::cout << "Before: " << sizeof(Before) << " bytes" << std::endl; std::cout << "After: " << sizeof(After) << " bytes" << std::endl; }
run
|
edit
|
history
|
help
0
cv3
Printf %px test
const reference life time extension
VC++ fail
hangman
Permute
Adaptive return type
define_xml_tags
MSVC-IsBaseOf
MSVC14 <exception> header