If I allocated an std::vector to a certain size and capacity using resize() and reserve() at the beginning of my program, is it possible that
resize()
reserve()
NO. Same as push_back , pop_back won't impact the capacity(). They just impact the size().
push_back
pop_back
capacity()
size()
EDIT:
I should have said push_back won't change the capacity when the v.size() < v.capacity().
v.size() < v.capacity()