Boost logo

Boost :

From: Sebastian Redl (sebastian.redl_at_[hidden])
Date: 2007-05-05 16:13:32


Jeff Garland wrote:
> By the standard I believe it is technically undefined behavior. But as a
> practical matter it's defined exactly the same on all compilers -- call the
> base class destructor.
>
The relevant quote is in 5.3.5/3:
"In the first alternative (delete object ), if the static type of the
operand is different from its dynamic type, the static type shall be a
base class of the operand’s dynamic type and the static type shall have
a virtual destructor or the behavior is undefined."

I really don't think that a Boost library should intentionally contain
undefined behaviour, even if the actual behaviour is very consistent
between implementations.

Sebastian Redl


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