Hacker News new | ask | show | jobs
by 9emE0iL18gxCqLT 4663 days ago
"C++'s idea of a reinterpret_cast lacks sufficient cojones." http://code.woboq.org/qt5/qtwebkit/Source/WTF/wtf/StdLibExtr...
2 comments

Afaik the usual practice when you want to hammer to the type system in to the dirt is to reinterpret_cast a pointer to FROM to a pointer to TO, and then dereference it. Alternatively just do a memcpy()
Relying on undefined behavior surely shows sufficient cojones.