
Hello, is it possible to remove the first bunch of elements of a circular_buffer with constant complexity time? Unfortunately using any (r)erase function the complexity is linear. To give an idea, it could be implemented like this: /// Erase the first pCount element from the buffer void begin_erase (size_t pCount) { BOOST_ASSERT(pCount <= size ()); circular_buffer<Type>::add (m_first, pCount); m_size -= pCount;; } but this is not taking into account deletion of the deleted items (could they be deleted when they are overwritten? Or the stored type does not need to be destroyed at all), and many other details which are known to me. I am asking this 'cause I would like to make my circular_buffer class to be STL compliant container, but before doing it myself, I would like to evaluate if I could derive (or use aggregation) directly from circular_buffer and save me a lot of work. Thanks, Luca