Boost logo

Boost Users :

From: Tiago de Paula Peixoto (tiago_at_[hidden])
Date: 2005-08-15 15:58:50


On Mon, 2005-08-15 at 10:14 +0400, Vladimir Prus wrote:
> Yes, null_vertex should be defined. I've just committed the attached patch
> to CVS, and your test program now compiles. You can either grab the current
> CVS version (CVS trunk), or apply the patch to 1.33 sources.

Thanks a lot!

I have one more problem with filtered_graph, but this time it has to do
with bundled properties. If I try to compile the following program:

--------------------------------------------------------------
#include <boost/graph/adjacency_list.hpp>
#include <boost/graph/filtered_graph.hpp>

using namespace boost;

struct VertexProperties
{
  int answer;
};

int main()
{
  typedef adjacency_list<vecS,vecS,bidirectionalS,VertexProperties> graph_t;
  typedef filtered_graph<graph_t,keep_all> f_graph_t;
  graph_t g;
  f_graph_t fg(g, keep_all());
  graph_traits<f_graph_t>::vertex_descriptor v = add_vertex(g);
  fg[v].answer = 42;
  return 0;
}
--------------------------------------------------------------
I get the following error with boost 1.33 and GCC 4.0.1:

/usr/include/boost/graph/filtered_graph.hpp: In member function
‘typename boost::graph::detail::bundled_result<Graph, Descriptor>::type&
boost::filtered_graph<Graph, EdgePredicate,
VertexPredicate>::operator[](Descriptor) [with Descriptor = unsigned
int, Graph = main()::graph_t, EdgePredicate = boost::keep_all,
VertexPredicate = boost::keep_all]’:
test2.cc:19: instantiated from here
/usr/include/boost/graph/filtered_graph.hpp:204: error:
‘local_to_global’ was not declared in this scope

This was supposed to work right? The error is pretty clear, but I don't
know what "local_to_global" is supposed to do, and where it should be.

I made the attached modifications to a local version of
filtered_graph.hpp, and the code above compiles, but I don't think that
they are right at all, since I changed the constness of the internal
reference to the original graph.

-- 
Tiago de Paula Peixoto <tiago_at_[hidden]>





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