Avoid integer overflow on negating distance

This commit is contained in:
Andrey Semashev
2017-07-10 14:57:40 +03:00
committed by GitHub
parent af5f6e49e0
commit c148962bd9

View File

@ -50,7 +50,7 @@ namespace iterators {
void advance(typename super_t::difference_type n)
{
this->base_reference() += -n;
this->base_reference() -= n;
}
template <class OtherIterator>