Boost C++ Libraries: Ticket #3376: graph::cuthill_mckee_ordering has_no_vertices cannot be found https://svn.boost.org/trac10/ticket/3376 <p> In version 1.40, lines 135 and 171 of graph/cuthill_mckee_ordering.hpp fail to compile with Microsoft Visual Studio 2005 (VC 8.0). </p> <p> The following example demonstrates the issue: </p> <div class="wiki-code"><div class="code"><pre><span class="kt">int</span> <span class="nf">main</span><span class="p">()</span> <span class="p">{</span> <span class="k">typedef</span> <span class="n">boost</span><span class="o">::</span><span class="n">property</span><span class="o">&lt;</span><span class="n">boost</span><span class="o">::</span><span class="n">vertex_name_t</span><span class="p">,</span> <span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="o">&gt;</span> <span class="n">VertexProperty</span><span class="p">;</span> <span class="k">typedef</span> <span class="n">boost</span><span class="o">::</span><span class="n">adjacency_matrix</span><span class="o">&lt;</span><span class="n">boost</span><span class="o">::</span><span class="n">undirectedS</span><span class="p">,</span> <span class="n">VertexProperty</span><span class="o">&gt;</span> <span class="n">MyGraph</span><span class="p">;</span> <span class="k">typedef</span> <span class="n">boost</span><span class="o">::</span><span class="n">graph_traits</span><span class="o">&lt;</span><span class="n">MyGraph</span><span class="o">&gt;::</span><span class="n">vertex_descriptor</span> <span class="n">Vertex</span><span class="p">;</span> <span class="n">MyGraph</span> <span class="n">graph</span><span class="p">(</span><span class="mi">0</span><span class="p">);</span> <span class="c1">// Fill graph with nodes, etc....</span> <span class="c1">// Perform reverse cuthill mckee...</span> <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o">&lt;</span><span class="n">Vertex</span><span class="o">&gt;</span> <span class="n">inv_perm</span><span class="p">(</span><span class="n">boost</span><span class="o">::</span><span class="n">num_vertices</span><span class="p">(</span><span class="n">graph</span><span class="p">));</span> <span class="p">{</span> <span class="n">boost</span><span class="o">::</span><span class="n">cuthill_mckee_ordering</span><span class="p">(</span><span class="n">graph</span><span class="p">,</span> <span class="n">inv_perm</span><span class="p">.</span><span class="n">rbegin</span><span class="p">());</span> <span class="c1">// do stuff with ordered graph...</span> <span class="p">}</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span> <span class="p">}</span> </pre></div></div><p> The call to boost::cuthill_mckee_ordering fails with: </p> <p> ../../boost/graph/cuthill_mckee_ordering.hpp(171) : error C3861: 'has_no_vertices': identifier not found </p> <p> Inspecting the code, has_no_vertices exists in the boost::graph namespace, but in this case it is called from boost::cuthill_mckee_ordering with no explicit namespace. Changing it to graph::has_no_vertices or boost::graph::has_no_vertices fixes the issue. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3376 Trac 1.4.3 Jeremiah Willcock Fri, 04 Sep 2009 14:54:26 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/3376#comment:1 https://svn.boost.org/trac10/ticket/3376#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/56016" title="Added qualification to has_no_vertices in cuthill_mckee_ordering; ...">[56016]</a>) Added qualification to has_no_vertices in cuthill_mckee_ordering; fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3376" title="#3376: Bugs: graph::cuthill_mckee_ordering has_no_vertices cannot be found (closed: fixed)">#3376</a> </p> Ticket