Boost C++ Libraries: Ticket #4914: Compile error reverse_graph and filter_graph https://svn.boost.org/trac10/ticket/4914 <p> Hello all, </p> <p> posted thru gmane but got all kinds of 'You seem to be top-posting. Don't do that.' messages. </p> <p> We just upgraded to Boost 1.45 with vs2008 but we got an error in code which has been built fine in the past. Sample code: </p> <p> #include &lt;boost\graph\adjacency_list.hpp&gt; #include &lt;boost\graph\graph_traits.hpp&gt; #include &lt;boost\graph\filtered_graph.hpp&gt; #include &lt;boost\graph\reverse_graph.hpp&gt; </p> <p> struct Filter { </p> <blockquote> <p> template &lt;typename Edge&gt; bool operator()(const Edge&amp; cr) const { </p> <blockquote> <p> return true; </p> </blockquote> <p> } </p> </blockquote> <p> }; </p> <p> int main() { </p> <blockquote> <p> typedef boost::adjacency_list&lt; </p> <blockquote> <p> boost::listS, boost::listS, boost::bidirectionalS, int </p> <blockquote class="citation"> <p> Graph; </p> </blockquote> </blockquote> </blockquote> <p> </p> <blockquote> <p> typedef boost::filtered_graph&lt;Graph, Filter&gt; <a class="missing wiki">FilteredGraph</a>; </p> </blockquote> <blockquote> <p> Graph graph; </p> </blockquote> <p> </p> <blockquote> <p> const Filter filter; const <a class="missing wiki">FilteredGraph</a> fgraph(graph, filter); </p> </blockquote> <blockquote> <p> boost::make_reverse_graph(fgraph); </p> </blockquote> <blockquote> <p> return 0; </p> </blockquote> <p> } </p> <p> Error: </p> <p> 1&gt;c:\work sdk\boost_1_45_0\boost\graph\graph_traits.hpp(222) : error C2039: 'graph_property_type' : is not a member of 'boost::filtered_graph&lt;Graph,<a class="missing wiki">EdgePredicate</a>&gt;' 1&gt; with 1&gt; [ 1&gt; Graph=Graph, 1&gt; <a class="missing wiki">EdgePredicate</a>=Filter 1&gt; ] 1&gt; c:\work sdk\boost_1_45_0\boost\graph\reverse_graph.hpp(83) : see reference to class template instantiation 'boost::graph_property_type&lt;G&gt;' being compiled 1&gt; with 1&gt; [ 1&gt; G=boost::filtered_graph&lt;Graph,Filter&gt; 1&gt; ] 1&gt; c:\work\temp\graph\graph.cpp(33) : see reference to class template instantiation 'boost::reverse_graph&lt;<a class="missing wiki">BidirectionalGraph</a>,<a class="missing wiki">GraphRef</a>&gt;' being compiled 1&gt; with 1&gt; [ 1&gt; <a class="missing wiki">BidirectionalGraph</a>=<a class="missing wiki">FilteredGraph</a>, 1&gt; <a class="missing wiki">GraphRef</a>=const <a class="missing wiki">FilteredGraph</a> &amp; 1&gt; ] 1&gt;c:\work sdk\boost_1_45_0\boost\graph\graph_traits.hpp(240) : error C2039: 'graph_bundled' : is not a member of 'boost::filtered_graph&lt;Graph,<a class="missing wiki">EdgePredicate</a>&gt;' 1&gt; with 1&gt; [ 1&gt; Graph=Graph, 1&gt; <a class="missing wiki">EdgePredicate</a>=Filter 1&gt; ] 1&gt; c:\work sdk\boost_1_45_0\boost\graph\reverse_graph.hpp(84) : see reference to class template instantiation 'boost::graph_bundle_type&lt;G&gt;' being compiled 1&gt; with 1&gt; [ 1&gt; G=boost::filtered_graph&lt;Graph,Filter&gt; 1&gt; ] 1&gt;c:\work sdk\boost_1_45_0\boost\graph\graph_traits.hpp(240) : error C2146: syntax error : missing ';' before identifier 'type' 1&gt;c:\work sdk\boost_1_45_0\boost\graph\graph_traits.hpp(240) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1&gt;c:\work sdk\boost_1_45_0\boost\graph\graph_traits.hpp(240) : error C2208: 'boost::type' : no members defined using this type 1&gt;c:\work sdk\boost_1_45_0\boost\graph\graph_traits.hpp(240) : fatal error C1903: unable to recover from previous error(s); stopping compilation </p> <p> ref: <a class="ext-link" href="http://article.gmane.org/gmane.comp.lib.boost.user/64165"><span class="icon">​</span>http://article.gmane.org/gmane.comp.lib.boost.user/64165</a> </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4914 Trac 1.4.3 anonymous Tue, 30 Nov 2010 17:24:38 GMT <link>https://svn.boost.org/trac10/ticket/4914#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4914#comment:1</guid> <description> <p> Somehow my whole nice formatting is eaten by SVN. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Jeremiah Willcock</dc:creator> <pubDate>Tue, 30 Nov 2010 17:47:25 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/4914#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4914#comment:2</guid> <description> <p> To get the formatting, use <code>{{{</code> and <code>}}}</code> (see <a class="ext-link" href="https://svn.boost.org/trac/boost/wiki/WikiFormatting"><span class="icon">​</span>https://svn.boost.org/trac/boost/wiki/WikiFormatting</a>). Note that your code uses backslashes in the <code>#include</code> file paths and does not initialize <code>filter</code> (an error in GCC). A fix for the actual problem is coming soon. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Jeremiah Willcock</dc:creator> <pubDate>Tue, 30 Nov 2010 17:48:36 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/4914#comment:3 https://svn.boost.org/trac10/ticket/4914#comment:3 <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/66900" title="Fixed bundled graph properties in filtered_graph; fixes #4914">[66900]</a>) Fixed bundled graph properties in filtered_graph; fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4914" title="#4914: Bugs: Compile error reverse_graph and filter_graph (closed: fixed)">#4914</a> </p> Ticket