Yeah, you could use it for that, but it’s got some caveats and is unsafe in some cases.
https://en.cppreference.com/cpp/language/reinterpret_cast
EDIT: If you’re able to use C++20 then clearly bit_cast is better.
https://en.cppreference.com/cpp/language/reinterpret_cast
EDIT: If you’re able to use C++20 then clearly bit_cast is better.
No comments yet.