Boost logo

Boost :

From: Philippe A. Bouchard (philippeb_at_[hidden])
Date: 2002-08-20 10:10:55


What I'm saying is purely theoretical. In Brave New World it would be great
to have some access to different platforms & compilers, but I think other
people are simply in a better situation to do so for now.

If someone else is able to prove his code is better than mine regarding
portability issues, more readable & easier to integrate into pointer
policies, then the resulting ptr.hpp development may be faster altogether.

Philippe A. Bouchard

"David B. Held" <dheld_at_[hidden]> wrote:
> "Philippe A. Bouchard" <philippeb_at_[hidden]> wrote:
> > Two things left to be done:
> > - ptrdiff_t to size_t convertions;
> > - BOOST_DATA_ALIGNMENT explicit ports (prob < 0.001).
>
> I wouldn't call this "98% portable" until you show that it works correctly
> on 98% of all compilers. Right now, it still looks like it's doing some
> rather hairy things. For instance, "1" doesn't point to an actual U*,
> or anything that can be construed as an actual U*, so I'm not sure
> whether it's valid to perform a conversion to T* on such a pointer.
> I like Larry Evans' solution of casting a char[] to a U* then to a T*,
> as a char[] that is the same size as U is guaranteed to have the same
> alignment, etc. (I believe, but don't quote me on that). And the fact
> that the char[] is convertible to an actual pointer, rather than a
contrived
> integral constant must surely be more portable than U*(1). Also, all
> the reinterpret_casts must be demonstrated to work as expected for
> your use case with much more rigorous examples than you have so
> far. And test results for different compilers would lend some weight
> to the claim that the pointer is actually *portable*.
>
> Dave
>
>
>
>
>
> _______________________________________________
> 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