cpp/container/vector/reserve

Increase the capacity of the vector (the total number of elements that the vector can hold without requiring reallocation) to a value that's greater or equal to. If is greater than the current capacity, new storage is allocated, otherwise the function does nothing.

does not change the size of the vector.

After a call to, insertions will not trigger reallocation unless the insertion would make the size of the vector greater than the value of capacity.

Return value
(none)

Exceptions

 * std if.
 * any exception thrown by (typically std)

If an exception is thrown, this function has no effect (strong exception guarantee).

Complexity
At most linear in the size of the container.