From: Alexander Terekhov (terekhov_at_[hidden])
Date: 2002-10-09 14:03:07
Eric Woodruff wrote:
> Every reference I can find excludes pointer conversions from being
> implementation defined. ....
Well, the standard aside...
(Subject: Re: reinterpret_cast vs. static_cast, comp.std.c++, 1997/02/10)
>Hmm... you're not saying that
> class A; class B;
> assert(reinterpret_cast<A*>(static_cast<B*>(0)) == static_cast<A*>(0));
>might fail? That is, different data objects can have different null pointer
Pointers to different objects can in general have different
sizes and representations. The effects of a reinterpret_cast
are up to the implemenation. You cannot assume a priori that
it will or will not change the representation of a pointer.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk