Does clearing a vector affect its capacity?

后端 未结 4 490
渐次进展
渐次进展 2020-12-03 13:26

I instantiate an std::vector foo(1000).

foo.size() is now 1000 and foo.capacity() is also 1000.

If I clear the vector

4条回答
提交回复
热议问题