#5
Mar 23
Strict Aliasing Will Ruin Your Day
The strict aliasing rule says you cannot access memory through a pointer of an incompatible type. The classic sin is casting a float* to an int* to inspect its bits. The correct way is memcpy or std::bit_cast in C++20.
By: alice_dev
Mar 23, 2026 18:39