|
Boost Users : |
Subject: Re: [Boost-users] Compilation error using boost::filtered_graph when trying to access graph properties via boost::graph_bundle
From: Tony Cook (tony__cook_at_[hidden])
Date: 2011-02-28 19:38:01
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<base_type>::type& operator[](graph_bundle_t)
{ return get_property(*this); }
typename boost::graph_property_type<base_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<Graph&>(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 again, Tony
> 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
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