[Boost-bugs] [Boost C++ Libraries] #6371: [graph] compile error directed_graph/undirected_graph

Subject: [Boost-bugs] [Boost C++ Libraries] #6371: [graph] compile error directed_graph/undirected_graph
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-01-10 01:25:54


#6371: [graph] compile error directed_graph/undirected_graph
-------------------------------------------------------+--------------------
 Reporter: Akira Takahashi <faithandbrave@…> | Owner: jewillco
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: graph
  Version: Boost 1.48.0 | Severity: Problem
 Keywords: |
-------------------------------------------------------+--------------------
 follow code is compile error:
 {{{
 #include <boost/graph/directed_graph.hpp>
 #include <boost/graph/undirected_graph.hpp>

 using namespace boost;

 int main()
 {
     directed_graph<> dg(5);
     graph_traits<directed_graph<> >::vertex_descriptor
         dv = vertex(3, dg); // error!

     undirected_graph<> ug(5);
     graph_traits<undirected_graph<> >::vertex_descriptor
         uv = vertex(3, ug); // error!

     return 0;
 }
 }}}

 patch is here:
 {{{
 --- directed_graph.hpp
 +++ directed_graph.hpp (bug fixed)
 @@ -410,7 +410,7 @@
  typename DIRECTED_GRAPH::vertex_descriptor
  vertex(typename DIRECTED_GRAPH::vertices_size_type n,
         DIRECTED_GRAPH const& g)
 -{ return vertex(g.impl()); }
 +{ return vertex(n, g.impl()); }
 }}}

 {{{
 --- undirected_graph.hpp
 +++ undirected_graph.hpp (bug fixed)
 @@ -413,7 +413,7 @@
  typename UNDIRECTED_GRAPH::vertex_descriptor
  vertex(typename UNDIRECTED_GRAPH::vertices_size_type n,
         UNDIRECTED_GRAPH const& g)
 -{ return vertex(g.impl()); }
 +{ return vertex(n, g.impl()); }
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/6371>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:08 UTC