Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The fix is always to replace static_cast with reinterpret_cast.

I've had cases when I was refactoring and suddenly somewehere in template code the compiler bascially told me that what I was trying to do was plain wrong, i.e. casting between completely unrelated types. In which case the fix is rewrite, not resort to reinterpret_cast.



Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: