|
Boost Users : |
From: Paul (linuxkaffee_at_[hidden])
Date: 2007-06-07 06:28:03
Hi,
I'm trying to learn how to use the Boost Graph Library. Here
is a very simple code example.
#include <boost/graph/adjacency_list.hpp>
#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
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net