Boost logo

Boost :

From: Gabriel Dos Reis (gdr_at_[hidden])
Date: 2002-12-07 06:28:46


"Eric Woodruff" <Eric.Woodruff_at_[hidden]> writes:

[...]

| > Thus, given that h.storage is properly aligned, (which is the purpose of
| the
| > other union member), after "new(h.storage) Foo", h.storage contains a Foo
| > object. Thus accessing it through a pointer-to-Foo is legal, as Foo is the
| > dynamic type of the object.
| >
|
| This is precisely my reasoning why reinterpret_cast<> is _not_
| implementation defined.
|
| It must be the case that it is equal to the situation of having
|
| Foo* -> char */void* -> Foo* if Foo is the dynamic type of the object.

After giving more thoughts to the analysis given by Anthony and
5.2.10/1, I think I agree with you're right.

-- Gaby


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