forked from boostorg/range
Hotfix to add back advance_begin and advance_end.
This commit is contained in:
1 parent
af2f17ccc5
commit
c865de5aa6
5 files changed
+77
No files matched your search
@@ -266,6 +266,9 @@ public:
|
||||
BOOST_ASSERT(n >= difference_type());
|
||||
std::advance(this->m_Begin, n);
|
||||
}
|
||||
|
||||
// Deprecated
|
||||
void pop_front() { drop_front(); }
|
||||
|
||||
protected:
|
||||
template<class Iterator>
|
||||
@@ -331,6 +334,9 @@ public:
|
||||
BOOST_ASSERT(n >= difference_type());
|
||||
std::advance(this->m_End, -n);
|
||||
}
|
||||
|
||||
// Deprecated
|
||||
void pop_back() { drop_back(); }
|
||||
};
|
||||
|
||||
template<class IteratorT>
|
||||
@@ -528,6 +534,20 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
iterator_range& advance_begin(
|
||||
BOOST_DEDUCED_TYPENAME base_type::difference_type n)
|
||||
{
|
||||
std::advance(this->m_Begin, n);
|
||||
return *this;
|
||||
}
|
||||
|
||||
iterator_range& advance_end(
|
||||
BOOST_DEDUCED_TYPENAME base_type::difference_type n)
|
||||
{
|
||||
std::advance(this->m_End, n);
|
||||
return *this;
|
||||
}
|
||||
|
||||
protected:
|
||||
//
|
||||
// Allow subclasses an easy way to access the
|
||||
|
||||
@@ -261,6 +261,20 @@ public:
|
||||
iterator_range_::operator=( static_cast<const iterator_range_&>(r) );
|
||||
return *this;
|
||||
}
|
||||
|
||||
sub_range& advance_begin(
|
||||
BOOST_DEDUCED_TYPENAME base::difference_type n)
|
||||
{
|
||||
std::advance(this->m_Begin, n);
|
||||
return *this;
|
||||
}
|
||||
|
||||
sub_range& advance_end(
|
||||
BOOST_DEDUCED_TYPENAME base::difference_type n)
|
||||
{
|
||||
std::advance(this->m_End, n);
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace 'boost'
|
||||
|
||||
Reference in new issue
Block a user