
19 Apr
2010
19 Apr
'10
12:35 p.m.
Il 19/04/2010 12:55, Jan Gaspar ha scritto:
Yes, that behaviour is expected. When the circular buffer is empty read_pos points to the end. After you put some items into it read_pos will point to the begining.
In your case I would recommend you not to rely on iterators as they may get invalidated. Instead, in you read operation rely on array_one() and after that clear the whole circular buffer.
Jan
Thanks a lot for the explanation and the suggestion! Daniele.