Click here to Skip to main content
15,889,216 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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);	
}

I have posted the same question on discussion board too... Please excuse me for that...
Posted
Updated 5-Jun-13 3:27am
v2

1 solution

Please do not repost the same question[^] in multiple forums.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900