Invalid base-to-derived static_cast
suggest changeIf static_cast
is used to convert a pointer (resp. reference) to base class to a pointer (resp. reference) to derived class, but the operand does not point (resp. refer) to an object of the derived class type, the behavior is undefined. See Base to derived conversion.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents