摘要: 最近在看《Effective STL》,【条款17:使用“交换技巧”修整过剩容量】中提到容器的成函数void swap(container& from),即实现容器对象与from对象的交换。另外,对于连续内存容器vector和string,还有shrink to fit(收缩到合适,根据容器的实际s... 阅读全文
posted @ 2015-05-10 22:42 yongpenghan 阅读(880) 评论(0) 推荐(0) 编辑