$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r78425 - trunk/boost/graph/detail
From: jewillco_at_[hidden]
Date: 2012-05-11 15:37:55
Author: jewillco
Date: 2012-05-11 15:37:54 EDT (Fri, 11 May 2012)
New Revision: 78425
URL: http://svn.boost.org/trac/boost/changeset/78425
Log:
Fixed handling of self-loops; fixes #4622
Text files modified: 
   trunk/boost/graph/detail/adjacency_list.hpp |     4 ++--                                    
   1 files changed, 2 insertions(+), 2 deletions(-)
Modified: trunk/boost/graph/detail/adjacency_list.hpp
==============================================================================
--- trunk/boost/graph/detail/adjacency_list.hpp	(original)
+++ trunk/boost/graph/detail/adjacency_list.hpp	2012-05-11 15:37:54 EDT (Fri, 11 May 2012)
@@ -988,15 +988,15 @@
         bool is_self_loop = (*ei).get_target() == u;
         // Don't erase from our own incidence list in the case of a self-loop
         // since we're clearing it anyway.
+        typename Config::OutEdgeList::iterator ei_copy = ei;
         if (!is_self_loop) {
           detail::erase_from_incidence_list
             (g.out_edge_list((*ei).get_target()), u, Cat());
-          typename Config::OutEdgeList::iterator ei_copy = ei;
           ++ei;
-          if (!is_self_loop) g.m_edges.erase((*ei_copy).get_iter());
         } else {
           ++ei;
         }
+        g.m_edges.erase((*ei_copy).get_iter());
       }
       g.out_edge_list(u).clear();
     }