template metaprogramming. Writing your own wrapper for erase and erase_if. Also covers unique_ptr and shared_ptr