The c++ macro offsetof is just defined behaviour when used on standard layout types. As I understood this is because the compiler can change the memory layout o
offsetof