I instantiate an std::vector foo(1000).
std::vector foo(1000)
foo.size() is now 1000 and foo.capacity() is also 1000.
foo.size()
foo.capacity()
If I clear the vector
The standard does not say anything about the effect of clear on capacity.
clear
capacity