A C++ operator that simply allows the conversion between types by reinterpreting the underlying bit pattern. In general use, this amounts a pointer to be converted into any other pointer type and it can also allow an integral type to be converted into any pointer type and vice versa.
A reinterpret_cast
directs the compiler to "view" or treat the memory as if it were the new type (being cast to).
From cppreference.com:
Unlike static_cast, but like const_cast, the reinterpret_cast expression does not compile to any CPU instructions. It is purely a compiler directive which instructs the compiler to treat the sequence of bits (object representation) of expression as if it had the type new_type.
There are limitations on what reinterpret_cast
can do whilst remaining valid, in particular type aliasing can become a problem.