casting via void* instead of using reinterpret_cast [duplicate]
For types for which such cast is permitted (e.g. if T1 is a POD-type and T2 is unsigned char), the approach with static_cast is well-defined by the Standard. On the other hand, reinterpret_cast is entirely implementation-defined – the only guarantee that you get for it is that you can cast a pointer type to any … Read more