|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r76868 - trunk/boost/graph
From: jewillco_at_[hidden]
Date: 2012-02-04 00:12:59
Author: jewillco
Date: 2012-02-04 00:12:58 EST (Sat, 04 Feb 2012)
New Revision: 76868
URL: http://svn.boost.org/trac/boost/changeset/76868
Log:
Fixed incorrect iterator type
Text files modified:
trunk/boost/graph/vector_as_graph.hpp | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
Modified: trunk/boost/graph/vector_as_graph.hpp
==============================================================================
--- trunk/boost/graph/vector_as_graph.hpp (original)
+++ trunk/boost/graph/vector_as_graph.hpp 2012-02-04 00:12:58 EST (Sat, 04 Feb 2012)
@@ -19,6 +19,7 @@
#include <vector>
#include <cstddef>
#include <boost/iterator.hpp>
+#include <boost/iterator/counting_iterator.hpp>
#include <boost/range/irange.hpp>
#include <boost/graph/graph_traits.hpp>
#include <boost/property_map/property_map.hpp>
@@ -71,7 +72,7 @@
out_edge_iterator;
typedef void in_edge_iterator;
typedef void edge_iterator;
- typedef typename integer_range<V>::iterator vertex_iterator;
+ typedef counting_iterator<V> vertex_iterator;
typedef directed_tag directed_category;
typedef allow_parallel_edge_tag edge_parallel_category;
typedef vector_as_graph_traversal_tag traversal_category;
@@ -178,14 +179,11 @@
// source() and target() already provided for pairs in graph_traits.hpp
template <class EdgeList, class Alloc>
- std::pair<typename boost::integer_range<typename EdgeList::value_type>
- ::iterator,
- typename boost::integer_range<typename EdgeList::value_type>
- ::iterator >
+ std::pair<boost::counting_iterator<typename EdgeList::value_type>,
+ boost::counting_iterator<typename EdgeList::value_type> >
vertices(const std::vector<EdgeList, Alloc>& v)
{
- typedef typename boost::integer_range<typename EdgeList::value_type>
- ::iterator Iter;
+ typedef boost::counting_iterator<typename EdgeList::value_type> Iter;
return std::make_pair(Iter(0), Iter(v.size()));
}
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk