4 ms·
What is reinterpret_cast for, if not type punning?
by ramshorns 8y ago
What is reinterpret_cast for, if not type punning?
- tom_ 8y agoUnadjusted conversion between pointer types that have matching cv qualifiers.
- kazinator 8y agoPointers are converted in order that they be used. Though the uses may be undefined, there is value in the conversion having a well-defined syntax. In effect, C and C++ allow certain intents to be expressed in a common way, without requiring implementations to make those intents work. This is better than having compiler-specific syntax for that sort of thing.