Hi,
I used boost serialization to write my data in binary format
as in below way –
std::ofstream
ofs(catalogFileName.c_str(),std::ios::binary);
boost::archive::binary_oarchive
oa(ofs);
//write
oa & m_myclass; // object of CMyClass type containing
some data (say name)
This worked correctly. Now I wanted to write into
xml format. Did the below changes
std::ofstream
ofs(catalogFileName.c_str(),std::ios::binary);
boost::archive::xml_oarchive
oa(ofs);
//write
oa & m_myclass;
But it is giving me below error –
d:\tools\boost-1feb08\boost_1_34_1\boost\archive\basic_xml_oarchive.hpp(83)
: error C2027: use of undefined type 'boost::STATIC_ASSERTION_FAILURE<x>'
Can you help me to identify the problem?
FYI – I have made no changed CMyClass looks like as
below. And I have made no changes in it (same one used for binary and xml)
class CMyClass
{
public:
Part(const
std::wstring& Name);
private:
std::wstring m_name;
friend
class boost::serialization::access;
template<class
Archive>
void
serialize(Archive& ar, const unsigned int)
{
ar & m_name;
}
};
Thanks in advance.
Regards,
Mukund