If I have a std:queue
can I erase an element in the middle?
Or should I just go for a simple vector?
EDIT:
In the end, my search became between std::list
and std::deque
. this post gives a nice comparison, although I am still a bit undecided.
On one side, since after deletion I won't be accessing more members (the operation finishes) I am not that concerned about iterator invalidation. On the other side, I will probably access (or search) elements one by one, so random access might not be that important...