Boost logo

Boost :

Subject: [boost] [graph] Bundled properties, listS, listS, write_graphml
From: remi.chateauneu_at_[hidden]
Date: 2008-11-27 18:42:03


Hi,

I try to use boost::graph with two bundled properties, listS for vertices and edges, and serialize with write_graphml, and it does not compile: Boost 1.35 and 1.36, Windows Visual C++ 8.0

Here are the most important details of the code:

class Host
{
        int idx ;
};

class SocketPair
{
        int xxx ;
};

typedef boost::adjacency_list<
                boost::listS, /// Needs stability of iterators.
                boost::listS, /// Needs stability of iterators.
                boost::directedS,
                Host,
                SocketPair > Graph;

Graph gblGrf ;

boost::dynamic_properties tmpDP ;

boost::write_graphml(
        std::ofstream("xxx.xml"),
        boost::vertex_index_map( boost::get( &Host::idx,_gblGrf ) ),
        gblGrf,
        tmpDP
        );

Here is the beginning of the compile errors. Any idea, please ??
Thanks in advance

1>c:\program files\boost\boost_1_36_0\boost\graph\graph_traits.hpp(26) :
error C2039: 'vertex_descriptor' : is not a member of
'boost::bgl_named_params<T,Tag,Base>'
1> with
1> [
1>
T=boost::bundle_property_map<boost::adjacency_list<boost::listS,boost::l
istS,boost::directedS,Host,SocketPair>,void *,Host,int>,
1> Tag=boost::vertex_index_t,
1> Base=boost::no_property
1> ]
1> c:\program
files\boost\boost_1_36_0\boost\graph\graphml.hpp(225) : see reference to
class template instantiation 'boost::graph_traits<G>' being compiled
1> with
1> [
1>
G=boost::bgl_named_params<boost::bundle_property_map<boost::adjacency_li
st<boost::listS,boost::listS,boost::directedS,Host,SocketPair>,void
*,Host,int>,boost::vertex_index_t,boost::no_property>
1> ]
1> i:\remi\graph\graph\graph.cpp(435) : see reference to function
template instantiation 'void
boost::write_graphml<boost::bgl_named_params<T,Tag,Base>,Netstat::Graph>
(std::ostream &,const Graph &,VertexIndexMap,const
boost::dynamic_properties &,bool)' being compiled
1> with
1> [
1>
T=boost::bundle_property_map<boost::adjacency_list<boost::listS,boost::l
istS,boost::directedS,Host,SocketPair>,void *,Host,int>,
1> Tag=boost::vertex_index_t,
1> Base=boost::no_property,
1>
Graph=boost::bgl_named_params<boost::bundle_property_map<boost::adjacenc
y_list<boost::listS,boost::listS,boost::directedS,Host,SocketPair>,void
*,Host,int>,boost::vertex_index_t,boost::no_property>,
1> VertexIndexMap=Netstat::Graph
1> ]
1>c:\program files\boost\boost_1_36_0\boost\graph\graph_traits.hpp(26) :
error C2146: syntax error : missing ';' before identifier
'vertex_descriptor'
1>c:\program files\boost\boost_1_36_0\boost\graph\graph_traits.hpp(26) :
error C4430: missing type specifier - int assumed. Note: C++ does not
support default-int
1>c:\program files\boost\boost_1_36_0\boost\graph\graph_traits.hpp(26) :
error C2602: 'boost::graph_traits<G>::vertex_descriptor' is not a member
of a base class of 'boost::graph_traits<G>'
1> with
1> [
1>
G=boost::bgl_named_params<boost::bundle_property_map<boost::adjacency_li
st<boost::listS,boost::listS,boost::directedS,Host,SocketPair>,void
*,Host,int>,boost::vertex_index_t,boost::no_property>
1> ]
1> c:\program
files\boost\boost_1_36_0\boost\graph\graph_traits.hpp(26) : see
declaration of 'boost::graph_traits<G>::vertex_descriptor'
1> with
1> [
1>
G=boost::bgl_named_params<boost::bundle_property_map<boost::adjacency_li
st<boost::listS,boost::listS,boost::directedS,Host,SocketPair>,void
*,Host,int>,boost::vertex_index_t,boost::no_property>
1> ]
1>c:\program files\boost\boost_1_36_0\boost\graph\graph_traits.hpp(26) :
error C2868: 'boost::graph_traits<G>::vertex_descriptor' : illegal
syntax for using-declaration; expected qualified-name
1> with
1> [
1>
G=boost::bgl_named_params<boost::bundle_property_map<boost::adjacency_li
st<boost::listS,boost::listS,boost::directedS,Host,SocketPair>,void
*,Host,int>,boost::vertex_index_t,boost::no_property>
1> ]
1>c:\program files\boost\boost_1_36_0\boost\graph\graph_traits.hpp(27) :
error C2039: 'edge_descriptor' : is not a member of
'boost::bgl_named_params<T,Tag,Base>'
1> with
1> [
1>
T=boost::bundle_property_map<boost::adjacency_list<boost::listS,boost::l
istS,boost::directedS,Host,SocketPair>,void *,Host,int>,
1> Tag=boost::vertex_index_t,
1> Base=boost::no_property
1> ]
1>c:\program files\boost\boost_1_36_0\boost\graph\graph_traits.hpp(27) :
error C2146: syntax error : missing ';' before identifier
'edge_descriptor'
1>c:\program files\boost\boost_1_36_0\boost\graph\graph_traits.hpp(27) :
error C4430: missing type specifier - int assumed. Note: C++ does not
support default-int
1>c:\program files\boost\boost_1_36_0\boost\graph\graph_traits.hpp(27) :
error C2602: 'boost::graph_traits<G>::edge_descriptor' is not a member
of a base class of 'boost::graph_traits<G>'
1> with
1> [
1>
G=boost::bgl_named_params<boost::bundle_property_map<boost::adjacency_li
st<boost::listS,boost::listS,boost::directedS,Host,SocketPair>,void
*,Host,int>,boost::vertex_index_t,boost::no_property>
1> ]
1> c:\program
files\boost\boost_1_36_0\boost\graph\graph_traits.hpp(27) : see
declaration of 'boost::graph_traits<G>::edge_descriptor'
1> with
1> [
1>
G=boost::bgl_named_params<boost::bundle_property_map<boost::adjacency_li
st<boost::listS,boost::listS,boost::directedS,Host,SocketPair>,void
*,Host,int>,boost::vertex_index_t,boost::no_property>
1> ]
1>c:\program files\boost\boost_1_36_0\boost\graph\graph_traits.hpp(27) :
error C2868: 'boost::graph_traits<G>::edge_descriptor' : illegal syntax
for using-declaration; expected qualified-name
1> with
1> [
1>
G=boost::bgl_named_params<boost::bundle_property_map<boost::adjacency_li
st<boost::listS,boost::listS,boost::directedS,Host,SocketPair>,void
*,Host,int>,boost::vertex_index_t,boost::no_property>
1> ]
1>c:\program files\boost\boost_1_36_0\boost\graph\graph_traits.hpp(28) :
error C2039: 'adjacency_iterator' : is not a member of
'boost::bgl_named_params<T,Tag,Base>'
1> with
1> [
1>
T=boost::bundle_property_map<boost::adjacency_list<boost::listS,boost::l
istS,boost::directedS,Host,SocketPair>,void *,Host,int>,
1> Tag=boost::vertex_index_t,
1> Base=boost::no_property
1> ]
1>c:\program files\boost\boost_1_36_0\boost\graph\graph_traits.hpp(29) :
error C2039: 'out_edge_iterator' : is not a member of
'boost::bgl_named_params<T,Tag,Base>'
1> with
1> [
1>
T=boost::bundle_property_map<boost::adjacency_list<boost::listS,boost::l
istS,boost::directedS,Host,SocketPair>,void *,Host,int>,
1> Tag=boost::vertex_index_t,
1> Base=boost::no_property
1> ]


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk