Hi,
I'm trying to learn how to use the Boost Graph Library. Here
is a very simple code example.
#include
#include <string>
int main( void )
{
using namespace std;
using namespace boost;
typedef adjacency_list< listS, vecS, directedS,
// Vertex properties
property< vertex_name_t, std::string >,
// Edge properties
property< edge_weight_t, int > > Graph;
Graph graph;
// Graph traits used to access graph's iterator types
graph_traits< Graph >::vertex_descriptor a, b;
a = add_vertex( graph );
b = add_vertex( graph );
graph_traits< Graph >::edge_descriptor ed;
bool inserted;
tie( ed, inserted ) = add_edge( a, b, graph ); // LINE 26
return 0;
}
When I compile this with g++ v4, I get on my Debian Etch system the
warning for line 26:
/usr/include/boost/graph/detail/adjacency_list.hpp:263:
warning: 'p$m_value' is used uninitialized in this function
Line 263 in adjacency_list.hpp looks as follows:
inline stored_edge_property(Vertex target,
const Property& p = Property())
: stored_edge<Vertex>(target), m_property(new Property(p)) { }
What am I doing wrong and how can I fix that?
Thank you.
Regards,
Paul