I have the following code:
#include <list>
#include <utility>
#include <vector>
#include <string>
#include <fstream>
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
int main()
{
list< pair > stlStr;
pair par1("aaa", "bbb");
stlStr.push_back(make_pair("key", par1));
std::ofstream ofs("filename");
{
boost::archive::text_oarchive serial(ofs);
serial << stlStr;
}
std::ifstream ifs("filename");
boost::archive::text_iarchive serial2(ifs);
list > lst;
serial2 >> lst;
return 0;
}
that throw the following compilation error:
error: 'class std::list >' has no member named 'serialize'.
I'd like to know if I have to manually implement the serialization of this
nested list. Because for example I haven't problems with maps that have
inside a pair : map >.
Thanks !