4 ms·
reinterpret_cast was the canonical way of doing it in C++, but now I believe that this is actually UB and so modern C++ should use std::bless. C++ also support
by secondcoming 6y ago
reinterpret_cast was the canonical way of doing it in C++, but now I believe that this is actually UB and so modern C++ should use std::bless.
C++ also supports C-style casts but it's a code smell.