How to cast my custom shared pointer in C++ I am creating a custom shared pointer in C++ to learn how these things work.