Re: [Boost-users] Compilation error using boost::filtered_graph when trying to access graph properties via boost::graph_bundle

Hi Jeremiah
** Confirmed fixed :) Thanks **
You might want to look at reverse_graph.hpp as it worked around the problem using:
typename boost::graph_property_type
Could you please see if this problem still appears in r69404 of the Boost trunk (just committed)? If you are using a release, you only need to get boost/graph/properties.hpp and boost/graph/graph_traits.hpp from the trunk and overwrite your copies. I believe I have fixed the bug -- your example from above compiles, at least.
-- Jeremiah Willcock

On Tue, 1 Mar 2011, Tony Cook wrote:
Hi Jeremiah
** Confirmed fixed :) Thanks **
You might want to look at reverse_graph.hpp as it worked around the problem using:
typename boost::graph_property_type
::type& operator[](graph_bundle_t) { return get_property(*this); } typename boost::graph_property_type ::type const& operator[](graph_bundle_t) const { return get_property(*this); } I adapted this fix approach for my local copy of filtered_graph.hpp like so:
typename Graph::graph_bundled& operator[](graph_bundle_t) { return const_cast
(this->m_g)[boost::graph_bundle]; } typename Graph::graph_bundled const& operator[](graph_bundle_t) const { return this->m_g[boost::graph_bundle]; } But your fix is general so the code in reverse_graph.hpp is most likely redundant now - I've chucked my local patch away.
Thanks for catching that -- I removed the workaround from reverse_graph.hpp and it still worked. -- Jeremiah Willcock
participants (2)
-
Jeremiah Willcock
-
Tony Cook