mirror of
https://github.com/boostorg/iterator.git
synced 2025-07-19 23:52:12 +02:00
Remove dependency on boost::prior.
This commit is contained in:
@ -7,7 +7,6 @@
|
|||||||
#ifndef BOOST_REVERSE_ITERATOR_23022003THW_HPP
|
#ifndef BOOST_REVERSE_ITERATOR_23022003THW_HPP
|
||||||
#define BOOST_REVERSE_ITERATOR_23022003THW_HPP
|
#define BOOST_REVERSE_ITERATOR_23022003THW_HPP
|
||||||
|
|
||||||
#include <boost/next_prior.hpp>
|
|
||||||
#include <boost/iterator/iterator_adaptor.hpp>
|
#include <boost/iterator/iterator_adaptor.hpp>
|
||||||
|
|
||||||
namespace boost {
|
namespace boost {
|
||||||
@ -39,7 +38,12 @@ namespace iterators {
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
private:
|
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 increment() { --this->base_reference(); }
|
||||||
void decrement() { ++this->base_reference(); }
|
void decrement() { ++this->base_reference(); }
|
||||||
|
Reference in New Issue
Block a user