I have functions that take in std::shared_ptr as an argument so I am forced to use std::shared_ptr, but the object I am passing to the function is not dynamically allocated.
MyType t; nasty_function(std::shared_ptr(&t, [](MyType*){}));