I have code that uses raw pointers throughout.
It needs to call a method that takes the raw pointer into a shared_ptr. This method is not under my control, belonging to an external api. I cannot just pass the pointer to the shared_ptr because when it will be deleted when the shared_ptr goes out of scope in the method (when the method returns).
Do I have any option other than making my raw pointer a shared_ptr in my internal code?