I guess it just doesn't matter than but I've always used the list implementation.
Printable View
I guess it just doesn't matter than but I've always used the list implementation.
In fact, the std::stack adapter uses back(), push_back() and pop_back(). I believe the reason why std::deque is the default has to do with the fact that std::vector does not reduce its capacity automatically, so you have to use the swap with empty container trick.Quote:
Originally Posted by Elysia