[ros-users] Ros Communications

Piotr Trojanek piotr.trojanek at gmail.com
Tue Dec 7 05:17:43 UTC 2010


Oh, sorry. Now I have realized what you mean. In fact this can be an issue.

I will check this more carefully and let you know. Thank you for pointing
out this!

On Tue, Dec 7, 2010 at 01:23, Troy Straszheim
<straszheim at willowgarage.com>wrote:

> On Mon, Dec 6, 2010 at 4:05 PM, Piotr Trojanek <piotr.trojanek at gmail.com>
> wrote:
> > Yes, I have tested the archive with std::vector and it simply works.
> >
> > I guess it works also for any collection, which is supported by
> > Boost::serialization framework.
> > The magic is in the <boost/serialization/vector.hpp> header, not in the
> > archive itself.
> >
> > For any primitive type always the same xdr_* function is called, so (by
> the
> > design of XDR)
> > it does not matter if the caller is 32 or 64 bit (nor if little/big
> endian).
> >
>
> Interesting.  collection_size_type is std::size_t:
>
>  BOOST_STRONG_TYPEDEF(std::size_t, collection_size_type)
>
> and in some implementations std::size_t is 'unsigned long'.  If you
> then use this implementation on two platforms where
> 'unsigned long' have different sizes, you will get incompatible
> archives.   In my experience with portable binary archives (we are
> going way back to boost 1.32), it was necessary to choose a size (e.g.
> handle collection_size_type explicitly and cast to uint64_t, for
> example).
>
> Cool archive, in any event.  boost::serialization is incredibly useful
> stuff.
>
> -t
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>



-- 
Piotr Trojanek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ros.org/pipermail/ros-users/attachments/20101207/8370c2a3/attachment-0003.html>


More information about the ros-users mailing list