id summary reporter owner description type status milestone component version severity resolution keywords cc 11609 circular_buffer erroneously invalidates reverse_iterator at pop_back in debug mode christian.stimming@… Jan Gaspar "The circular_buffer container offers reverse iterators. Using one so that it points to the second-to-last element would in theory allow to pop_back() the last element without causing problems with that iterator. However, apparently pop_back() invalidates those reverse iterators even though they wouldn't cause problems, as if the debug_iterator_registry in boost/circular_buffer/debug.hpp is working correctly only for forward iterators but not for backward iterators. Example code that works fine without debug mode, but will run into a failed assertion in debug mode: {{{ #define BOOST_CB_ENABLE_DEBUG #include #include int main(int /*argc*/, char** /*argv*/) { typedef boost::circular_buffer CircBuffer; CircBuffer testBuffer(2); testBuffer.push_back(4); testBuffer.push_back(8); CircBuffer::const_reverse_iterator bufIter = testBuffer.rbegin(); std::cout << ""element at rbegin="" << *bufIter << std::endl; // prints ""=8"" correctly ++bufIter; std::cout << ""element after ++="" << *bufIter << std::endl; // prints ""=4"" correctly testBuffer.pop_back(); std::cout << ""elem="" << *bufIter << std::endl; // ERROR: Causes ""Assertion `is_valid(m_buff)' failed."" } }}} " Bugs new To Be Determined circular_buffer Boost 1.57.0 Problem