Boost logo

Boost Users :

Subject: Re: [Boost-users] [BGL] Bundled properties and property maps
From: Andrew Sutton (andrew.n.sutton_at_[hidden])
Date: 2008-11-18 19:22:38


>
> // typedef boost::property_map<Graph, double const EdgeProp::*>::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:

Gotta a const Graph also:

property_map<const Graph, double const EdgeProp::*>

Andrew Sutton
andrew.n.sutton_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