Hi, oh sorry, i was wrong in the last message. Although i changed to pass a const pointer to the serialize function, the errors are still there ... I have put the attribute in NVP wrappers. You can see the header file Mesage.h here http://codepad.org/ktpm8Aab Regards, Binh Matthias Troyer-2 wrote:
On 4 Mar 2010, at 00:54, Binh Luong wrote:
Hi,
thank you very much for your answer. I was stuck with this problem for days. I have changed the code so that a const pointer is now passed to the RemoteMessagingSystem::serialize: string RemoteMessagingSystem::serialize (Message* const msg) { ... }
But the problem with deserialize is still there:
Here is the code fragement: Message* RemoteMessagingSystem::deserialize (string data) { stringstream archivStream (data, ios_base::binary | ios_base::in); #ifdef REMOTE_XML boost::archive::xml_iarchive inputArchive( archivStream ); #else boost::archive::binary_iarchive inputArchive( archivStream ); #endif
Message* msg = NULL; //line 164 inputArchive >> msg;
return msg; }
Should I also change here Message* to Message* const?
Actually it is something strange because with the old versoin Boost 1.38 there are no compiling errors. Since i compiled and installed the new version 1.42 i got those errors. Something should be changed between the 2 versions although i have compared the both source codes but do not find any difference :/
Did you try putting it into an NVP wrapper? AFAIK XML archives only serialize NVPs
Matthias
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
-- View this message in context: http://old.nabble.com/Problem-with-Boost-Serialization-tp27743377p27779665.h... Sent from the Boost - Users mailing list archive at Nabble.com.