The previous code invokes undefined behavior. memcpy will optimize away to the relevant loads and stores while maintaining well-defined behavior.
The previous code invokes undefined behavior. memcpy will optimize away to the relevant loads and stores while maintaining well-defined behavior.