Closed cs96and closed 4 years ago
With Boost 1.72.0, the following code causes an assert under debug, or a divide by zero for release builds...
boost::container::deque<int> myDeque; auto iter = myDeque.begin(); std::advance(iter, 0);
This happens when trying to take a zero sized slice of an empty deque...
boost::container::deque<int> myDeque; nItems = 0; for(const auto &item : myDeque | boost::adaptors::sliced(0, nItems)) { // do something }
This looks similar to #83 which was a similar issue but for vectors instead of deques.
Thanks for the report. This was fixed in https://github.com/boostorg/container/pull/137 and will be released for Boost 1.74.
With Boost 1.72.0, the following code causes an assert under debug, or a divide by zero for release builds...
This happens when trying to take a zero sized slice of an empty deque...
This looks similar to #83 which was a similar issue but for vectors instead of deques.