You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[cppyy] Auto-downcast objects returned through smart pointers
Returning an object by raw pointer already triggers an automatic
downcast to its actual (most derived) class, but returning it through a
smart pointer (`std::unique_ptr`, `std::shared_ptr`) did not: the object
was bound as the declared underlying type, so derived-class members were
not accessible.
This became more and more of a nuisance as smart pointers become more
common in C++ interface.
Therefore, this commit implements automatic downcasting also for returned
smart pointers.
Closes#16210.
0 commit comments