
AMDG Simonson, Lucanus J <lucanus.j.simonson <at> intel.com> writes:
provided that Derived does not modify Base by multiple inheritance, adding a member or a virtual pointer, because it can't prove that derivedRef is not an alias for the pointer to base because it could be that derivedRef is an alias for baseRef as part of the standard compliant usage.
If your argument did hold at all it also holds when Derived contains a virtual pointer. The presence of a virtual pointer does not allow the compiler to prove that derivedRef is not an alias for the pointer to base. Where does that exception come from? The fact that it will obviously not work? Does this mean that we can assume that it doesn't really matter what the standard labels as undefined behavior if we think it will work anyway? What is the point of having a standard then? In Christ, Steven Watanabe