Boost C++ Libraries: Ticket #8192: dag_shortest_paths or make_reverse_graph problem since 1.48 https://svn.boost.org/trac10/ticket/8192 <p> The attached code compiles (and works) with boost 1.47 (g++ 4.4.6, GNU/Linux x86) but it does not compile with boost 1.48. The problem persists with the last version (boost 1.53). </p> <p> g++ -I boost_1_47_0/ dag_test.cpp -&gt; ok </p> <p> g++ -I boost_1_48_0/ dag_test.cpp -&gt; In file included from boost_1_48_0/boost/graph/topological_sort.hpp:15, </p> <blockquote> <p> from boost_1_48_0/boost/graph/dag_shortest_paths.hpp:13, from dag_test.cpp:10: </p> </blockquote> <p> boost_1_48_0/boost/property_map/property_map.hpp: In function 'Reference boost::get(const boost::put_get_helper&lt;Reference, <a class="missing wiki">PropertyMap</a>&gt;&amp;, const K&amp;) [with <a class="missing wiki">PropertyMap</a> = boost::adj_list_edge_property_map&lt;boost::bidirectional_tag, int, int&amp;, long unsigned int, boost::property&lt;boost::edge_weight_t, int, boost::no_property&gt;, boost::edge_weight_t&gt;, Reference = int&amp;, K = boost::detail::reverse_graph_edge_descriptor&lt;boost::detail::edge_desc_impl&lt;boost::bidirectional_tag, long unsigned int&gt; &gt;]': boost_1_48_0/boost/graph/relax.hpp:53: instantiated from 'bool boost::relax(typename boost::graph_traits&lt;Graph&gt;::edge_descriptor, const Graph&amp;, const <a class="missing wiki">WeightMap</a>&amp;, <a class="missing wiki">PredecessorMap</a>&amp;, <a class="missing wiki">DistanceMap</a>&amp;, const <a class="missing wiki">BinaryFunction</a>&amp;, const <a class="missing wiki">BinaryPredicate</a>&amp;) [with Graph = boost::reverse_graph&lt;boost::adjacency_list&lt;boost::vecS, boost::vecS, boost::bidirectionalS, boost::property&lt;boost::vertex_distance_t, int, boost::no_property&gt;, boost::property&lt;boost::edge_weight_t, int, boost::no_property&gt;, boost::no_property, boost::listS&gt;, main()::graph_t&amp;&gt;, <a class="missing wiki">WeightMap</a> = boost::adj_list_edge_property_map&lt;boost::bidirectional_tag, int, int&amp;, long unsigned int, boost::property&lt;boost::edge_weight_t, int, boost::no_property&gt;, boost::edge_weight_t&gt;, <a class="missing wiki">PredecessorMap</a> = long unsigned int*, <a class="missing wiki">DistanceMap</a> = boost::vec_adj_list_vertex_property_map&lt;boost::adjacency_list&lt;boost::vecS, boost::vecS, boost::bidirectionalS, boost::property&lt;boost::vertex_distance_t, int, boost::no_property&gt;, boost::property&lt;boost::edge_weight_t, int, boost::no_property&gt;, boost::no_property, boost::listS&gt;, boost::adjacency_list&lt;boost::vecS, boost::vecS, boost::bidirectionalS, boost::property&lt;boost::vertex_distance_t, int, boost::no_property&gt;, boost::property&lt;boost::edge_weight_t, int, boost::no_property&gt;, boost::no_property, boost::listS&gt;*, int, int&amp;, boost::vertex_distance_t&gt;, <a class="missing wiki">BinaryFunction</a> = boost::closed_plus&lt;int&gt;, <a class="missing wiki">BinaryPredicate</a> = std::less&lt;int&gt;]' boost_1_48_0/boost/graph/dag_shortest_paths.hpp:64: instantiated from 'void boost::dag_shortest_paths(const <a class="missing wiki">VertexListGraph</a>&amp;, typename boost::graph_traits&lt;Graph&gt;::vertex_descriptor, <a class="missing wiki">DistanceMap</a>, <a class="missing wiki">WeightMap</a>, <a class="missing wiki">ColorMap</a>, <a class="missing wiki">PredecessorMap</a>, <a class="missing wiki">DijkstraVisitor</a>, Compare, Combine, <a class="missing wiki">DistInf</a>, <a class="missing wiki">DistZero</a>) [with <a class="missing wiki">VertexListGraph</a> = boost::reverse_graph&lt;boost::adjacency_list&lt;boost::vecS, boost::vecS, boost::bidirectionalS, boost::property&lt;boost::vertex_distance_t, int, boost::no_property&gt;, boost::property&lt;boost::edge_weight_t, int, boost::no_property&gt;, boost::no_property, boost::listS&gt;, main()::graph_t&amp;&gt;, <a class="missing wiki">DijkstraVisitor</a> = boost::dijkstra_visitor&lt;boost::null_visitor&gt;, <a class="missing wiki">DistanceMap</a> = boost::vec_adj_list_vertex_property_map&lt;boost::adjacency_list&lt;boost::vecS, boost::vecS, boost::bidirectionalS, boost::property&lt;boost::vertex_distance_t, int, boost::no_property&gt;, boost::property&lt;boost::edge_weight_t, int, boost::no_property&gt;, boost::no_property, boost::listS&gt;, boost::adjacency_list&lt;boost::vecS, boost::vecS, boost::bidirectionalS, boost::property&lt;boost::vertex_distance_t, int, boost::no_property&gt;, boost::property&lt;boost::edge_weight_t, int, boost::no_property&gt;, boost::no_property, boost::listS&gt;*, int, int&amp;, boost::vertex_distance_t&gt;, <a class="missing wiki">WeightMap</a> = boost::adj_list_edge_property_map&lt;boost::bidirectional_tag, int, int&amp;, long unsigned int, boost::property&lt;boost::edge_weight_t, int, boost::no_property&gt;, boost::edge_weight_t&gt;, <a class="missing wiki">ColorMap</a> = boost::default_color_type*, <a class="missing wiki">PredecessorMap</a> = long unsigned int*, Compare = std::less&lt;int&gt;, Combine = boost::closed_plus&lt;int&gt;, <a class="missing wiki">DistInf</a> = int, <a class="missing wiki">DistZero</a> = int]' dag_test.cpp:58: instantiated from here boost_1_48_0/boost/property_map/property_map.hpp:354: error: no match for 'operator[]' in '(const boost::adj_list_edge_property_map&lt;boost::bidirectional_tag, int, int&amp;, long unsigned int, boost::property&lt;boost::edge_weight_t, int, boost::no_property&gt;, boost::edge_weight_t&gt;&amp;)((const boost::adj_list_edge_property_map&lt;boost::bidirectional_tag, int, int&amp;, long unsigned int, boost::property&lt;boost::edge_weight_t, int, boost::no_property&gt;, boost::edge_weight_t&gt;*)(&amp; pa))[k]' boost_1_48_0/boost/graph/detail/adjacency_list.hpp:2636: note: candidates are: Ref boost::adj_list_edge_property_map&lt;Directed, Value, Ref, Vertex, Property, Tag&gt;::operator[](boost::detail::edge_desc_impl&lt;Directed, Vertex&gt;) const [with Directed = boost::bidirectional_tag, Value = int, Ref = int&amp;, Vertex = long unsigned int, Property = boost::property&lt;boost::edge_weight_t, int, boost::no_property&gt;, Tag = boost::edge_weight_t] </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/8192 Trac 1.4.3 JB Mouret <mouret@…> Wed, 27 Feb 2013 21:22:15 GMT attachment set https://svn.boost.org/trac10/ticket/8192 https://svn.boost.org/trac10/ticket/8192 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">dag_test.cpp</span> </li> </ul> <p> Test (derived from example/dag_shortest_paths.cpp) </p> Ticket Jeremiah Willcock Wed, 27 Feb 2013 22:04:26 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/8192#comment:1 https://svn.boost.org/trac10/ticket/8192#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/83191" title="Fixed handling of const graphs and property maps; fixes #8192">[83191]</a>) Fixed handling of const graphs and property maps; fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/8192" title="#8192: Bugs: dag_shortest_paths or make_reverse_graph problem since 1.48 (closed: fixed)">#8192</a> </p> Ticket Jeremiah Willcock Wed, 27 Feb 2013 22:06:08 GMT <link>https://svn.boost.org/trac10/ticket/8192#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8192#comment:2</guid> <description> <p> In addition to the bug fix I just put in the trunk, the definition of <code>w_map</code> should be: </p> <pre class="wiki">property_map&lt;reverse_graph&lt;graph_t&gt;, edge_weight_t&gt;::type w_map = get(edge_weight, make_reverse_graph(g)); </pre><p> Note that the code explicitly gets the property map type and the map itself from the reverse graph. </p> </description> <category>Ticket</category> </item> <item> <author>JB Mouret <mouret@…></author> <pubDate>Wed, 27 Feb 2013 22:31:22 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8192#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8192#comment:3</guid> <description> <p> Thank you for the tip. This was a fast bug fix! </p> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/8192#comment:2" title="Comment 2">jewillco</a>: </p> <blockquote class="citation"> <p> In addition to the bug fix I just put in the trunk, the definition of <code>w_map</code> should be: </p> <pre class="wiki">property_map&lt;reverse_graph&lt;graph_t&gt;, edge_weight_t&gt;::type w_map = get(edge_weight, make_reverse_graph(g)); </pre><p> Note that the code explicitly gets the property map type and the map itself from the reverse graph. </p> </blockquote> </description> <category>Ticket</category> </item> </channel> </rss>