Hello,
When trying to serialize a STL map, doing the following (in Visual C++ 7.1):
class Being
{
private:
std::wstring Name, Description;
friend class boost::serialization::access;
public:
template<class Archive>
void serialize(Archive & ar, const unsigned int version)
{
ar & this->Name;
ar & this->Description;
}
};
class Ecosystem
{
private:
friend class boost::serialization::access;
std::map<std::wstring,Being> Beings;
public:
template<class Archive>
void serialize(Archive & ar, const unsigned int version)
{
ar & this->Beings;
}
};
...
ar & ecosystem; // Making the serialization within some function (storing)
...
I get this compile-time error:
"c:\Boost\include\boost-1_33_1\boost\serialization\access.hpp(109): error C2039: 'serialize' : is not a member of
'std::map<_Kty,_Ty>' with [_Kty=std::wstring,_Ty=Models::Beings]"
Has anyone any ideas about the reason for this error?
Thanking you in advance,
David