Hello there! My first post here.
I'm attempting to use static_cast to upcast a Base object (which gets downcast using dynamic_cast beforehand for storage in a container). It seems to work great on objects that are not involved in the multiple inheritance I have set up.
Classes Derived and Derived2 are virtual to allow for the creation of Derived 3.Code:The inheritance: Base / \ Derived Derived2 \ / Derived3
Any upcasting with static_cast seems to work with a derived class that is not involved in multiple inheritacne, and incidentally not virtual.
Does anyone have any pointers (ha!) for using static_cast (or any cast that will work) to return my dowcasted base object back to its proper derived class?