Remove dependency on boost::prior.

This commit is contained in:
Andrey Semashev
2017-07-09 18:31:06 +03:00
committed by GitHub
parent 67a2336cf4
commit 26ee5ba754

View File

@ -7,7 +7,6 @@
#ifndef BOOST_REVERSE_ITERATOR_23022003THW_HPP
#define BOOST_REVERSE_ITERATOR_23022003THW_HPP
#include <boost/next_prior.hpp>
#include <boost/iterator/iterator_adaptor.hpp>
namespace boost {
@ -39,7 +38,12 @@ 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(); }