int main() { vector<int> vInt; for (int i=0; i<5; ++i) { vInt.push_back(i); cout << vInt.capacity() << " "; } vector<int> vTmp(vInt); cout << vTmp.capacity() << "\n"; return 0; }
1 2 3 4 5 5
1 2 3 4 5 8
1 2 4 4 8 5
1 2 4 4 8 8