Try putting it in either the namespace of std::map
Robert Ramey
wrote: Which version of boost are you using? I believe this may have come up and been addressed in 1_33_1?
Now that spirit is fixed I have tried again on the CVS (1_34). Unfortunately I now have a different error -- it prefers the serialize template over my serialize function?
#include <map> #include <fstream> #include
#include // For std::pair struct Mark {}; enum MarkId {low,median,high}; typedef std::map
MarkMap; void serialize(boost::archive::xml_wiarchive & ar, MarkMap & m, const unsigned int version) { MarkMap::iterator it; for (it = m.begin() ; it != m.end(); ++it) { ar & boost::serialization::make_nvp("item", *it); } }
int main(int argc, char* argv[]) { std::wifstream ifs; boost::archive::xml_wiarchive ar(ifs); MarkMap marks; ar & boost::serialization::make_nvp("marks",marks); }