Boost logo

Boost :

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


http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndeepc/htm
l/deep06012000.asp

http://www.cplusplus.com/doc/tutorial/tut5-4.html

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
news:u3crfpm0d.fsf_at_boost-consulting.com...
> "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:
> http://lists.boost.org/MailArchives/boost/msg36823.php
>
> --
> David Abrahams * Boost Consulting
> dave_at_[hidden] * http://www.boost-consulting.com
>
> _______________________________________________
> Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost
>


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