To be clear, I’m definitely not in favor of removing the lvalue implicit cast without updating the API to use smart pointers appropriately. Nobody wants to go back to needing .Get()
everywhere. That would be the “best” route in the sense that raw pointers would be eliminated from our API and the risks of bad/unsafe implicit conversions would be eliminated. But it would also be an incredibly disruptive change, so I don’t really expect it to happen.
These days, I pretty much treat vtkNew
like unique_ptr
. The functionality is nearly the same and it’s useful in many of the same contexts.
So far, it seems the most agreeable solution is to just disable the rvalue implicit casts and keep things mostly the way they are. I think we can live with just needing to use Get
when pulling a pointer out of a temporary smart pointer.