diff options
Diffstat (limited to 'boost/iterator/reverse_iterator.hpp')
-rw-r--r-- | boost/iterator/reverse_iterator.hpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/boost/iterator/reverse_iterator.hpp b/boost/iterator/reverse_iterator.hpp index 3bef39e4b6..7ed6b1b5ef 100644 --- a/boost/iterator/reverse_iterator.hpp +++ b/boost/iterator/reverse_iterator.hpp @@ -7,7 +7,6 @@ #ifndef BOOST_REVERSE_ITERATOR_23022003THW_HPP #define BOOST_REVERSE_ITERATOR_23022003THW_HPP -#include <boost/next_prior.hpp> #include <boost/iterator.hpp> #include <boost/iterator/iterator_adaptor.hpp> @@ -40,14 +39,19 @@ namespace iterators { {} private: - typename super_t::reference dereference() const { return *boost::prior(this->base()); } + typename super_t::reference dereference() const + { + Iterator it = this->base_reference(); + --it; + return *it; + } void increment() { --this->base_reference(); } void decrement() { ++this->base_reference(); } void advance(typename super_t::difference_type n) { - this->base_reference() += -n; + this->base_reference() -= n; } template <class OtherIterator> |