stl deque multiple push_back & remove_front

T

toton

Hi,
I am looking for a circular buffer solution ( a fixed buffer) , where
the elements can be pushed back & removed front. It looks stl deque
can be a solution. my question is,
1) circular buffer is random access? (i.e implemented over array and
not linked list)
2) if I reserve the required space & do push_back & remove_front so
that total memory doesn't exceed the reserved amount, will the internal
pointers will wrap, or the memory will physically move?
3) if it physically move, any stl container for a circular buffer
exists (i need a resize option also) ?
4) if memory don't physically move, i.e can implement a circular
buffer, what is the result of resize with lesser size? will it remove
the oldest push backs, or from the end of memory?

thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top