I\'m using a std::shared_ptr in my application to make a smart pointer which can point to many different types of data structures like structs, vect
This is not good practice. If you don't store additional type information next to your std::shared_ptr (which you can cast using static_pointer_cast) you have undefined behaviour all around. Maybe Boost.Any is an option for you?
If you want to stick with std::shared_ptr please remember to provide a custom deleter function (see make shared_ptr not use delete).