Questions tagged [struct-member-alignment]
32 questions
0
votes
0 answers
swift alignment issue withUnsafeBytes and UnsafePointer
In the following code testP.deviceID and testP.deviceID1 should have the same value. However testP.deviceID1 contains 2 (it should contain 513). So there is something fundamental that I am not understanding regarding alignment?
let…

eklektek
- 1,083
- 1
- 16
- 31
-2
votes
2 answers
Structure padding with union members of std::bitset
After I had solved my issue to this question I went on to expand this version of my code to incorporate the unions of the data fields from my previous template versions with this version and I have this so far:
main.cpp
#include
#include…

Francis Cugler
- 7,788
- 2
- 28
- 59