$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r61796 - in trunk: boost/graph boost/graph/detail libs/graph/example
From: jewillco_at_[hidden]
Date: 2010-05-05 14:49:41
Author: jewillco
Date: 2010-05-05 14:49:40 EDT (Wed, 05 May 2010)
New Revision: 61796
URL: http://svn.boost.org/trac/boost/changeset/61796
Log:
Fixed various bugs in incremental_components and its example, plus made that example build by default
Text files modified: 
   trunk/boost/graph/detail/incremental_components.hpp |     2 +-                                      
   trunk/boost/graph/incremental_components.hpp        |     3 ++-                                     
   trunk/libs/graph/example/Jamfile.v2                 |     1 +                                       
   trunk/libs/graph/example/components_on_edgelist.cpp |     8 ++++----                                
   4 files changed, 8 insertions(+), 6 deletions(-)
Modified: trunk/boost/graph/detail/incremental_components.hpp
==============================================================================
--- trunk/boost/graph/detail/incremental_components.hpp	(original)
+++ trunk/boost/graph/detail/incremental_components.hpp	2010-05-05 14:49:40 EDT (Wed, 05 May 2010)
@@ -60,7 +60,7 @@
         return (*this);
       }
 
-      bool operator==(self& other_iterator) {
+      bool operator==(const self& other_iterator) const {
         return (m_current_index == *other_iterator);
       }
 
Modified: trunk/boost/graph/incremental_components.hpp
==============================================================================
--- trunk/boost/graph/incremental_components.hpp	(original)
+++ trunk/boost/graph/incremental_components.hpp	2010-05-05 14:49:40 EDT (Wed, 05 May 2010)
@@ -18,6 +18,7 @@
 #include <boost/iterator/counting_iterator.hpp>
 #include <boost/make_shared.hpp>
 #include <boost/pending/disjoint_sets.hpp>
+#include <iterator>
 
 namespace boost {
 
@@ -175,7 +176,7 @@
     void build_index_lists(ParentIterator parent_start,
                            const ElementIndexMap& index_map) {
 
-      typedef typename ParentIterator::value_type Element;
+      typedef typename std::iterator_traits<ParentIterator>::value_type Element;
       typename IndexContainer::iterator index_list =
         m_index_list->begin();
 
Modified: trunk/libs/graph/example/Jamfile.v2
==============================================================================
--- trunk/libs/graph/example/Jamfile.v2	(original)
+++ trunk/libs/graph/example/Jamfile.v2	2010-05-05 14:49:40 EDT (Wed, 05 May 2010)
@@ -23,3 +23,4 @@
 exe bipartite_example : bipartite_example.cpp ;
 exe fr_layout : fr_layout.cpp ;
 exe canonical_ordering : canonical_ordering.cpp ;
+exe components_on_edgelist : components_on_edgelist.cpp ;
Modified: trunk/libs/graph/example/components_on_edgelist.cpp
==============================================================================
--- trunk/libs/graph/example/components_on_edgelist.cpp	(original)
+++ trunk/libs/graph/example/components_on_edgelist.cpp	2010-05-05 14:49:40 EDT (Wed, 05 May 2010)
@@ -80,11 +80,11 @@
          << ds.find_set(k) << endl;
   cout << endl;
 
-  for (component_index<int>::size_type i = 0; i < components.size(); ++i) {
+  for (std::size_t i = 0; i < components.size(); ++i) {
     cout << "component " << i << " contains: ";
-    component_index<int>::value_type::iterator
-      j = components[i].begin(),
-      jend = components[i].end();
+    component_index<int>::component_iterator
+      j = components[i].first,
+      jend = components[i].second;
     for ( ; j != jend; ++j)
       cout << *j << " ";
     cout << endl;