From: Jan Gaspar (jano_gaspar_at_[hidden])
Date: 2008-04-08 07:37:30
Yes, using the modulus operation would do. But I think wrapping the circular_buffer instead of deriving from it would suit better as there is no virtual destructor present in the circular_buffer.
----- Original Message ----
From: Neal Becker <ndbecker2_at_[hidden]>
Sent: Monday, 7 April, 2008 2:25:20 PM
Subject: [boost] [circular-buffer] indexes
I use my own implementation of circular buffers which simulate an infinite
buffer that simply wraps around. The indexes are not restricted in either
positive or negative direction. This is a very useful construct (believe
it or not).
It looks like boost::circular_buffer restricts the indexes. I suppose the
straightforward way to use boost::circular_buffer would be derive from it
and add a modulus operation to the indexing?
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Yahoo! For Good helps you make a difference
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk