mirror of
https://github.com/boostorg/iterator.git
synced 2025-07-17 22:52:13 +02:00
Avoid integer overflow on negating distance
This commit is contained in:
@ -50,7 +50,7 @@ namespace iterators {
|
|||||||
|
|
||||||
void advance(typename super_t::difference_type n)
|
void advance(typename super_t::difference_type n)
|
||||||
{
|
{
|
||||||
this->base_reference() += -n;
|
this->base_reference() -= n;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class OtherIterator>
|
template <class OtherIterator>
|
||||||
|
Reference in New Issue
Block a user