On Wed, Feb 18, 2009 at 5:16 PM, Scott McMurray <me22.ca+boost@gmail.com> wrote:
Perhaps this?

   boost::circular_buffer<vector<T> > schedule(100);

Then you could use

   schedule.rotate(schedule.begin()+1);

to move to the next bucket, which should (in steady-state) avoid
reallocation of the container or the buckets, since you never actually
destruct or copy the vectors.

http://www.boost.org/doc/libs/1_38_0/libs/circular_buffer/doc/circular_buffer.html

Wow, this is actually perfect. So before I do a rotate(), I need to do: schedule[0].clear() right? When I do future push_back operations on schedule[99], I want it to be adding to an empty vector and not adding to the old contents of it.

I appreciate your help!