Boost logo

Boost :

From: Eric Woodruff (Eric.Woodruff_at_[hidden])
Date: 2002-12-04 21:29:49


"David Abrahams" <dave_at_[hidden]> wrote in message
news:ufztdlczv.fsf_at_boost-consulting.com...
> Gabriel Dos Reis <gdr_at_[hidden]> writes:
>
> > Thanks for your patience.
> >
> > Now, imagine an implementation where the original type is remembered,
> > then dereferencing the pointer obtained from
> >
> > char* -> void* -> T*
> >
> > may just eject you into the outer space.
>
> Is remembering the original type _of_ _the_ _pointer_ actually legal?
> Can you quote chapter and verse on this? I thought the implementation
> was only permitted to eject you if you use a pointer where the actual
> type _of_ _the_ _pointee_ is wrong.
>

I was under the impression that the pointee was not actually a T (thus
making the use of reinterpret_cast char* -> T* implementation defined). Does
this mean that the ability to dereference is equally as non-portable as
reinterpret_cast<>ing?

> --
> David Abrahams
> dave_at_[hidden] * http://www.boost-consulting.com
> Boost support, enhancements, training, and commercial distribution
>
> _______________________________________________
> 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