std::vector capacity after copying

后端 未结 5 540
悲&欢浪女
悲&欢浪女 2020-12-02 01:40
  • Does vector::operator= change vector capacity? If so, how?
  • Does vector\'s copy constructor copy capacity?

I looked through documentation but c

5条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-02 02:32

    It is implementation dependent. Most in practice shrink the vectors to the minimum size.

提交回复
热议问题