Aliasing `T*` with `char*` is allowed. Is it also allowed the other way around?
- by StackedCrooked
Note: This question has been renamed and reduced to make it more focused and readable. Most of the comments refer to the old text.
According to the standard objects of different type may not share the same memory location. So this would not be legal:
int i = 0;
short * s = reinterpret_cast<short*>(&i); // BAD!
The standard however…