A deep dive into a common C++ misconception: that reinterpret_cast converts an object from one type to another. In reality, reinterpret_cast only converts the pointer type — it does not create a new object or start its lifetime. Accessing the resulting pointer as the new type is undefined behavior. The post contrasts this with

5m read timeFrom andreasfertig.com
Post cover image
Table of contents
My motivationThe most common (misusage) I seeYou often want object lifetimeKey takeways

Sort: