Boost::serialization with unicode values
-
Hey guys, I am new to boost. I have to work with boost::serialization. My class is having a member that is wstring. This wstring may have unicode values like
ഡഢണതഥദധന
[this is just some garbage I tried to test it with...] When I try to add the unicode member to the xml_oarchive, it gives me the following assert
Quote:
Assertion failed! Program: ... File: [Some_Path]\Tools\Boost\.../mb_fro...har.hpp Line: 93 Expression: -1 != m_bend For information on how your program can cause an assertion failure, see the Visual C++ documentation on asserts
Following is the code snippet... Help me guys, I am stuck :confused:
// Boost headers
#include "boost\archive\xml_oarchive.hpp"
#include "boost\serialization\list.hpp"
#include "boost\serialization\string.hpp"std::stringstream StringStream;
boost::archive::xml_oarchive oa(StringStream, flags);
oa << boost::serialization::make_nvp("Tag", obj_with_wstring);//Serialize method of the class with obj_with_wstring
serialize(Archive & ar, const unsigned int version)
{
ar & boost::serialization::make_nvp("tag", m_wstrUnicode);
}