Boost logo

Boost :

From: Steven Watanabe (steven_at_[hidden])
Date: 2007-10-11 21:09:48


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


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk