diff options
Diffstat (limited to 'boost/graph/matrix_as_graph.hpp')
-rw-r--r-- | boost/graph/matrix_as_graph.hpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/boost/graph/matrix_as_graph.hpp b/boost/graph/matrix_as_graph.hpp index fb727940d7..4e8d56b921 100644 --- a/boost/graph/matrix_as_graph.hpp +++ b/boost/graph/matrix_as_graph.hpp @@ -12,6 +12,8 @@ #define BOOST_GRAPH_MATRIX2GRAPH_HPP #include <utility> +#include <cstddef> +#include <iterator> #include <boost/config.hpp> #include <boost/operators.hpp> #include <boost/pending/detail/int_iterator.hpp> @@ -86,10 +88,14 @@ namespace boost { template <class Iter, class Vertex> class matrix_adj_iterator - : public std::iterator<std::input_iterator_tag, Vertex > { typedef matrix_adj_iterator self; public: + typedef std::input_iterator_tag iterator_category; + typedef Vertex value_type; + typedef std::ptrdiff_t difference_type; + typedef Vertex* pointer; + typedef Vertex& reference; matrix_adj_iterator() { } matrix_adj_iterator(Iter i) : _iter(i) { } matrix_adj_iterator(const self& x) : _iter(x._iter) { } @@ -105,10 +111,14 @@ namespace boost { template <class Iter, class Vertex> class matrix_incidence_iterator - : public std::iterator<std::input_iterator_tag, Iter > { typedef matrix_incidence_iterator self; public: + typedef std::input_iterator_tag iterator_category; + typedef Iter value_type; + typedef std::ptrdiff_t difference_type; + typedef Iter* pointer; + typedef Iter& reference; matrix_incidence_iterator() { } matrix_incidence_iterator(Iter i) : _iter(i) { } matrix_incidence_iterator(const self& x) : _iter(x._iter) { } |