From: Andrew Sutton (asutton_at_[hidden])
Date: 2008-02-27 20:24:19
> as it seems I've found a bug in the depth_first_search algorithm.
> I want to use it with my own ColorMap and a start vertex. Here
> is the code taken from
> http://www.boost.org/libs/graph/example/dfs-example.cpp with
> some slight modifications:
It's a problem with the way you're calling the function. You're
> depth_first_search(g, visitor(vis), &color, root );
> /usr/include/boost/graph/depth_first_search.hpp:197: error: 'struct
> boost::graph_visitor_t, boost::no_property>' has no member named
> dfs.cc:76: instantiated from here
It looks like you're calling a function that takes a visitor type as
the 2nd parameter. The problem is that the visitor() function is
probably creating a bgl_named_parameters struct, not a visitor.
Needless to say, the named parameters structure doesn't have members
named initialize_vertex() or finish_vertex(), etc. Try chaining the
named parameters together like this:
> So, there seem to be a bug in the algorithm. When calling it as
> defined in the exampl file from the Boost side without a ColorMap
> and a vertex, it works fine.
Again, it's not really a bug in the algorithm... There's so much
genericism in the interface that it's easy to get lost in the
instantiations. This library is due for a serious overhaul.
Boost list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk