Boost C++ Libraries: Ticket #12: Can't specify VertexPredicate https://svn.boost.org/trac10/ticket/12 <pre class="wiki">From boost_1_25_1/boost/graph/filtered_graph.hpp, line 230: template &lt;typename Graph, typename EdgePredicate, typename VertexPredicate&gt; inline filtered_graph&lt;Graph, EdgePredicate, VertexPredicate&gt; make_filtered_graph(Graph&amp; g, EdgePredicate ep, VertexPredicate vp) { return filtered_graph&lt;Graph, EdgePredicate&gt;(g, ep, vp); } make_filtered_graph is a template function, one of whose template parameters is VertexPredicate. However, the filtered_graph object returned by the function does not make use of this type. I propose that line 233 should read: return filtered_graph&lt;Graph, EdgePredicate, VertexPredicate&gt;(g, ep, vp); I'm using g++ 2.95.3 on Solaris 2.8 for sparc. For the following test case: #include &lt;boost/graph/filtered_graph.hpp&gt; #include &lt;boost/graph/adjacency_list.hpp&gt; using namespace boost; struct NotMuchOfAFilter { template&lt;class Vertex&gt; bool operator()(Vertex key) const { return true; } }; int main() { adjacency_list&lt;&gt; graph; make_filtered_graph(graph, keep_all(), NotMuchOfAFilter()); } g++ test.C -ftemplate-depth-30 -Iboost_1_25_1 yields: boost_1_25_1/boost/graph/filtered_graph.hpp: In function `class boost::filtered_graph&lt;boost::adjacency_list&lt;boost::vecS,boost::vecS,boost::directedS,boost::no_property,boost::no_property,boost::no_property,boost::listS&gt;,boost::keep_all,NotMuchOfAFilter&gt; boost::make_filtered_graph&lt;boost::adjacency_list&lt;boost::vecS,boost::vecS,boost::directedS,boost::no_property,boost::no_property,boost::no_property,boost::listS&gt;, boost::keep_all, NotMuchOfAFilter&gt;(boost::adjacency_list&lt;boost::vecS,boost::vecS,boost::directedS,boost::no_property,boost::no_property,boost::no_property,boost::listS&gt; &amp;, boost::keep_all, NotMuchOfAFilter)': test.C:14: instantiated from here boost_1_25_1/boost/graph/filtered_graph.hpp:233: no matching function for call to `boost::filtered_graph&lt;boost::adjacency_list&lt;boost::vecS,boost::vecS,boost::directedS,boost::no_property,boost::no_property,boost::no_property,boost::listS&gt;,boost::keep_all,boost::keep_all&gt;::filtered_graph (boost::adjacency_list&lt;boost::vecS,boost::vecS,boost::directedS,boost::no_property,boost::no_property,boost::no_property,boost::listS&gt; &amp;, boost::keep_all &amp;, NotMuchOfAFilter &amp;)' boost_1_25_1/boost/graph/filtered_graph.hpp:156: candidates are: boost::filtered_graph&lt;boost::adjacency_list&lt;boost::vecS,boost::vecS,boost::directedS,boost::no_property,boost::no_property,boost::no_property,boost::listS&gt;,boost::keep_all,boost::keep_all&gt;::filtered_graph(const boost::adjacency_list&lt;boost::vecS,boost::vecS,boost::directedS,boost::no_property,boost::no_property,boost::no_property,boost::listS&gt; &amp;, boost::keep_all) boost_1_25_1/boost/graph/filtered_graph.hpp:159: boost::filtered_graph&lt;boost::adjacency_list&lt;boost::vecS,boost::vecS,boost::directedS,boost::no_property,boost::no_property,boost::no_property,boost::listS&gt;,boost::keep_all,boost::keep_all&gt;::filtered_graph(const boost::adjacency_list&lt;boost::vecS,boost::vecS,boost::directedS,boost::no_property,boost::no_property,boost::no_property,boost::listS&gt; &amp;, boost::keep_all, boost::keep_all) boost_1_25_1/boost/graph/filtered_graph.hpp:219: boost::filtered_graph&lt;boost::adjacency_list&lt;boost::vecS,boost::vecS,boost::directedS,boost::no_property,boost::no_property,boost::no_property,boost::listS&gt;,boost::keep_all,boost::keep_all&gt;::filtered_graph(const boost::filtered_graph&lt;boost::adjacency_list&lt;boost::vecS,boost::vecS,boost::directedS,boost::no_property,boost::no_property,boost::no_property,boost::listS&gt;,boost::keep_all,boost::keep_all&gt; &amp;) boost_1_25_1/boost/graph/filtered_graph.hpp:233: warning: control reaches end of non-void function `boost::make_filtered_graph&lt;boost::adjacency_list&lt;boost::vecS,boost::vecS,boost::directedS,boost::no_property,boost::no_property,boost::no_property,boost::listS&gt;, boost::keep_all, NotMuchOfAFilter&gt;(boost::adjacency_list&lt;boost::vecS,boost::vecS,boost::directedS,boost::no_property,boost::no_property,boost::no_property,boost::listS&gt; &amp;, boost::keep_all, NotMuchOfAFilter) Making the change I noted above causes the code to compile and run correctly. Keep up the good work on boost and the boost graph library. Congratulations on the new book! </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12 Trac 1.4.3 jsiek Fri, 09 Nov 2001 20:58:12 GMT status changed https://svn.boost.org/trac10/ticket/12#comment:1 https://svn.boost.org/trac10/ticket/12#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> </ul> <pre class="wiki">Logged In: YES user_id=32836 Thanks for catching that! I've checked your suggested fix into CVS. </pre> Ticket