Boost logo

Boost :

From: Eric Woodruff (Eric.Woodruff_at_[hidden])
Date: 2002-10-09 12:58:15

Every reference I can find excludes pointer conversions from being
implementation defined. They all (even the standard) specifically treat
pointer conversions differently (clause 7) than pointer->integer->pointer
conversions. This is because creating an integer requires mapping the bits
to a temporary, converting pointers does not require this because pointers
share the same underlying representation, and it is done in compile time so
there is no possibility of translation occuring.

"reinterpret_cast treats all pointers exactly as traditional type-casting
operators do. "

"David Abrahams" <dave_at_[hidden]> wrote in message
> "Eric Woodruff" <Eric.Woodruff_at_[hidden]> writes:
> > [snip]
> > >
> > > You can't count on any particular behavior if you use reinterpret_cast
> > > for anything, unless you read the compiler manual first.
> > > [snip]
> >
> >
> > There's no mention of that in the standard
> Of course there is. You snipped the part of my previous message where
> I quoted the section that says the mapping performed by
> reinterpret_cast is implementation-defined! Wiping out the public
> record and claiming it was never there is a very interesting and
> creative argumentation technique, but somehow I don't think it's going
> to fool too many people. In today's world, archives are forever:
> --
> David Abrahams * Boost Consulting
> dave_at_[hidden] *
> _______________________________________________
> Unsubscribe & other changes:

Boost list run by bdawes at, gregod at, cpdaniel at, john at