boostorg / container

STL-like containers from Boost
http://www.boost.org/libs/container/
Boost Software License 1.0
96 stars 116 forks source link

RandomAccessIterator + 0 #137

Closed RobertLeahy closed 4 years ago

RobertLeahy commented 4 years ago

Previously the iterators of boost::container::deque would assert when zero was added to them in at least the following situations:

This is inconsistent with the way in which the iterators of boost::container::deque have behaved historically and is also inconsistent with an understanding of iterators developed by analogy with pointers:

Fixed this issue and codified the expected behavior in unit tests.

igaztanaga commented 4 years ago

Many thanks for the fix!