Boost logo

Boost :

From: Robert Ramey (ramey_at_[hidden])
Date: 2007-11-02 15:03:04


I've discovered that recent changes in binary_?archive render
portable_binary_?archive
unusable. It was originally made as an example to demostrate extension
via inheritance. Since it no longer serves that purpose, it will be removed
in the near future.

Robert Ramey

Boris Gubenko wrote:
> Two serialization library tests: test_demo_portable_archive[_dll] fail
> to compile on many platforms with invalid type conversion error. I did
> not check all the platforms, but I'd expect it to fail on any big
> endian platform. The patch below fixes the problem, verified on HP-UX
> with
> both aC++ and gcc.
>
> Ok to commit?
>
> Index: example/portable_binary_oarchive.hpp
> ===================================================================
> --- example/portable_binary_oarchive.hpp (revision 40687)
> +++ example/portable_binary_oarchive.hpp (working copy)
> @@ -76,7 +76,7 @@
>
> // we choose to use litle endian
> #ifdef BOOST_BIG_ENDIAN
> - char * first = static_cast<char *>(static_cast<void *>(&
> l)); + char * first = reinterpret_cast<char
> *>(const_cast<long *>(& l)); char * last = first +
> sizeof(l) - 1; for(;first < last;++first, --last){
> char x = *last;
>
> Thanks,
> Boris
>
> _______________________________________________
> 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