|
Boost Users : |
Subject: [Boost-users] [Serialization]Serialization of nested stl object
From: Kangkook Jee (aixer77_at_[hidden])
Date: 2011-09-20 16:37:56
Hi, all
A member of a target class, where one STL object (map) includes another (set), prevent the code from being built properly
and the error message urges me to implement *serialize* method for pair<string*, set<unsigned>>.
What is the typical way of implementing serialization using boost for this kind of data structures?
* Code snippet
class B {
map<const string*, set<unsigned> > lines;
..
template<class Archive>
void serialize (Archive & ar, const unsigned int version) {
ar & lines;
* Build error message
/opt/local/include/boost/serialization/access.hpp:118: error: class std::map<const std::string*, std::set<unsigned int, std::less<unsigned int>, std::allocator<unsigned int> >, std::less<const std::string*>, std::allocator<std::pair<const std::string* const, std::set<unsigned int, std::less<unsigned int>, std::allocator<unsigned int> > > > > has no member named serialize
Thanks for your help in advance,
/Kangkook
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