[Serialization] portable binary archive
Hi, Few month ago I have started a thread about an issue with the potable binary archive demo: http://lists.boost.org/boost-users/2007/03/26274.php Robert, Were you able to find the exact bug? Thanks in advance Dan
I believe I couldn't reproduce it with the code on the CVS HEAD so I assumed
that it was no longer a problem and stopped looking.
Robert Ramey
"Dan Leibovich"
Hi, I have tried using the HEAD version and found the same issues. Let me summarize my findings: I have used the to use the portable_binary_o/iarchive to serialize classes with strings and integers (no floating point) I have got deferent results on linux / solaris hosts. I have found that metadata types like class_id_type are not saved correctly. The save_impl(long t) method is not called for this kind of types. The following program never reaches the save_impl method ------------------------------------------ #include "portable_binary_oarchive.hpp" #include <fstream> int main() { char* file = "file" ; boost::archive::class_id_type cid ; std::ofstream ofs(file, std::ios::binary) ; portable_binary_oarchive oar(ofs) ; oar << cid ; ofs.close() ; } ------------------------------------------ I have tried adding specialization like: void save(const boost::archive::class_id_type t){ save_impl(t); } and: void load(unsigned short & t){ long l; load_impl(l, sizeof(unsigned long)); t = l; } void load(short & t){ long l; load_impl(l, sizeof(long)); t = l; } But it resulted with portable_binary_archive_exception if(size > maxsize) throw portable_binary_archive_exception() ; Do you have any suggestion on how to proceed. Thanks in advance, Dan
-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Robert Ramey Sent: ב 25 יוני 2007 20:50 To: boost-users@lists.boost.org Subject: Re: [Boost-users] [Serialization] portable binary archive
I believe I couldn't reproduce it with the code on the CVS HEAD so I assumed that it was no longer a problem and stopped looking.
Robert Ramey
"Dan Leibovich"
wrote in message news:80726DBE398EBB4A8B77AD210C509EAA034B93DF@MAILEU.global.cad ence.com... Hi, Few month ago I have started a thread about an issue with the potable binary archive demo: http://lists.boost.org/boost-users/2007/03/26274.php Robert, Were you able to find the exact bug?
Thanks in advance Dan
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
Dan Leibovich
-
Robert Ramey