#include #include #include #include #include #include #include #include #include #include #include #include struct vertex_properties { std::string name; template void serialize(Archive & ar, const unsigned int version) { ar & name; } }; struct edge_properties { std::string name; template void serialize(Archive & ar, const unsigned int version) { ar & name; } }; using namespace boost; typedef adjacency_list Graph; typedef adjacency_list Graph_no_edge_property; int main() { { std::ofstream ofs("./kevin-bacon2.dat"); archive::text_oarchive oa(ofs); Graph g; oa << g; Graph_no_edge_property g_n; oa << g_n; } { std::ifstream ifs("./kevin-bacon2.dat"); archive::text_iarchive ia(ifs); Graph g; ia >> g; Graph_no_edge_property g_n; ia >> g_n; } return 0; }