Hi Andrew,
Thanks very much for the help, I've got it working now. I had to use a
non-const reference though. Here are the options I tried:
// Option A:
Graph &nonConstGraph = const_cast(graph);
typedef boost::property_map::type
EdgeWeightMap;
EdgeWeightMap edgeWeightMap = get(&EdgeProp::cost, nonConstGraph);
// Option B:
// typedef boost::property_map::type
EdgeWeightMap;
// EdgeWeightMap edgeWeightMap = get(&EdgeProp::cost, graph);
Option A works, but is a bit ugly.
Option B is what you suggested, but it gives the following error:
/home/a.brooks/shh/src/libs/prm/test/stupid.cpp:70: error: conversion
from 'boost::bundle_property_map, boost::detail::edge_desc_impl, EdgeProp, const double>' to non-scalar type 'searchThroughGraph(const
Graph&, VertexRef, VertexRef, std::vector&)::EdgeWeightMap' requested
Do I also need to modify the 'get()' line?
It's pointer-to-member syntax. Read from right to left You're saying that
the type is a "pointer to a member of EdgeProp that is of type double." Or
in this case, a pointer to a const EdgeProp that's a double.
Awesome, thanks for the pointer.
Cheers,
Alex