On Fri, 18 Dec 2009, Maxime van Noppen wrote:
Jeremiah Willcock wrote:
Please tell me if there are any problems, as I have not tested this.
It seems to work. I had to do a little fix to your code though. In the function_property_map you use 'value_type' which isn't defined and which is, I believe :
typedef typename boost::property_traits< function_property_map
>::value_type value_type;
OK. It actually should be "typename boost::result_of
I also changed the functor type from 'Functor' to 'const Functor&'. It seems to work. What was the rationale for copying it ?
In case your operator()() in the functor is non-const (even though I said I was assuming it was const); switching to a reference is fine.
My functor needs to have a pointer/reference to the graph to be able to get the my_edge object from the edge_descriptor passed to the operator().
OK. Did it work otherwise? -- Jeremiah Willcock