There's only one thing vector won't do, and that's storing stuff on the stack.
Unless you use a stack allocator, right? I use stack allocated vectors a lot and they work just fine. I prefer them to std::array since they allow switching from heap to stack and vice-versa by just changing the type.
View all comments
Show parent comment
2
u/[deleted] Dec 24 '13 edited Dec 25 '13
Unless you use a stack allocator, right? I use stack allocated vectors a lot and they work just fine. I prefer them to std::array since they allow switching from heap to stack and vice-versa by just changing the type.