Re:Fast Inverse Square Root
by TwoBit on Monday November 02, 2020 @09:49PM
(#24975868)
I really wish C and C++ had an explicit type punning operator. They are systems programming languages and this is very often needed.
[ Parent
| on HN ]
C++20 introduces bit_cast to do this. The implementation of bit_cast is semantically equivalent to using memcpy.