4 ms·
Going off a few answers similar to this one [0], I'd say that it isn't defined behaviour. It'll be specific to your compiler, and its optimisations. The memcpy
by shakna 10y ago
Going off a few answers similar to this one [0], I'd say that it isn't defined behaviour. It'll be specific to your compiler, and its optimisations.
The memcpy solution is what I've seen throughout the industry when you are trying to cast between non-trivial types.
[0] http://stackoverflow.com/a/4318446 http://stackoverflow.com/a/4318446