|
Boost Users : |
Subject: [Boost-users] [graph] compile breadth_first_search error.
From: gongyiling (gongyiling3468_at_[hidden])
Date: 2011-10-02 01:33:34
i 'm a newbie to boost graph library, I'm trying to compile a sample code as
following:
struct demo_visitor : public boost::default_bfs_visitor
{
template <typename Vertex, typename Graph>
void discover_vertex(Vertex v, Graph& g)
{
//std::cout<<g[v].url<<std::endl;
}
};
int main(int argc, char* argv[])
{
typedef boost::adjacency_list<boost::vecS,
boost::listS, //change this to boost::vecS compile ok.
boost::directedS> graph_t;
typedef boost::graph_traits<graph_t>::vertex_descriptor
vertex_descriptor_t;
graph_t g;
demo_visitor vis;
boost::breadth_first_search(g, boost::vertex(0, g),
boost::visitor(vis));
return 0;
}
And it fail to compile will the error in two_bit_color_map.hpp: can't
transfer boost::detail::error_property_not_found to size_t.
When I change the second type argument(VertexListS) of boost::adjacency_list
from boost::listS to boost::vecS, it compile ok.
Is there any implicite constraints on breadth_first_search?
I also checked that boost::adjacency_list match the VertexListGraph concept
both, using boost::vecS and boost::listS as it VertexListS type argument.
Any response is appreacited!
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