|
Boost : |
Subject: [boost] [BGL][Serialization] Error with edge_desc_impl
From: Ireneusz SzczeÅniak (irek.szczesniak_at_[hidden])
Date: 2010-07-13 02:29:01
Hi,
I have a problem serializing a graph in my code. I distilled the
problem into this program:
#include <boost/graph/adjacency_list.hpp>
#include <boost/archive/text_oarchive.hpp>
#include <boost/graph/adj_list_serialize.hpp>
using namespace boost;
class test;
typedef
adjacency_list <vecS, vecS, undirectedS, property<vertex_name_t, test> >
Graph;
typedef Graph::edge_descriptor Edge;
class test
{
public:
Edge t;
template<class Archive>
void serialize(Archive & ar, const unsigned int)
{
ar & t;
}
};
int main()
{
Graph g;
boost::archive::text_oarchive oa(std::cout);
oa << g;
return 0;
}
This is the error message that I get:
/usr/include/boost/serialization/access.hpp:109: error: âclass
boost::detail::edge_desc_impl<boost::undirected_tag, unsigned int>â
has no member named âserializeâ
If I remove the field "t" of type Edge in the class "test", I don't
get this error.
I would appreciate it, if someone could point out where the problem is.
Thanks,
Irek
-- Ireneusz (Irek) Szczesniak http://www.irkos.org
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk