reinterpret_cast<> for punning purposes can lead to UB. The recommended C++ alternative to avoid UB is bit_cast<><a href="https://stackoverflow.com/questions/53401654/why-was-stdbit-cast-added-if-reinterpret-cast-could-do-the-same" rel="nofollow">https://stackoverflow.com/questions/53401654/why-was-stdbit-...
K0IN · · focus · HN ↗
jasode · · focus · HN ↗
<a href="https://stackoverflow.com/questions/53401654/why-was-stdbit-cast-added-if-reinterpret-cast-could-do-the-same" rel="nofollow">https://stackoverflow.com/questions/53401654/why-was-stdbit-...