
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