|
Boost Users : |
From: Robert Ramey (ramey_at_[hidden])
Date: 2006-08-16 15:06:58
have you included:
#include <boost/serialization/map.hpp>
?
Robert Ramey
"David Guardado" <unmais_at_[hidden]> wrote in message
news:2d62d080608161201y5b423f45n2bfaeb88b86993db_at_mail.gmail.com...
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
_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net