Most casts are performed using the static_cast operator, and this can be used to convert pointers to related pointer types as well as converting between numeric types. There are no runtime checks performed so you should be certain that the conversion is acceptable:
double pi = 3.1415; int pi_whole = static_cast<int>(pi);
Here a double is converted to an int, which means that the fractional part is discarded. Normally the compiler would issue a warning that data is lost, but the static_cast operator shows that this is your intention and hence the warning is not given.
The operator is often used to convert void* pointers to a typed pointer. In the following code the unsafe_d function assumes that the parameter ...