[#bsl-vector-0e8-reserve]
= xref:bsl.adoc[bsl]::xref:bsl/vector-0e8.adoc[vector&lt;unsigned long&gt;]::reserve
:relfileprefix: ../../
:mrdocs:

Change the capacity of this vector to the specified `newCapacity`&period; If an exception is thrown (other than by the move constructor of a non&hyphen;copy&hyphen;insertable `value&lowbar;type`), `&ast;this` is unaffected&period; Throw `bsl&colon;&colon;length&lowbar;error` if `newCapacity &gt; max&lowbar;size()`&period; This method requires that the (template parameter) type `VALUE&lowbar;TYPE` be `move&hyphen;insertable` into this vector (see &lcub;Requirements on `VALUE&lowbar;TYPE`&rcub;)&period; Note that the capacity of this vector after this operation has completed may be greater than `newCapacity`&period;

== Synopsis

Declared in `&lt;bslstl&lowbar;vector&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
reserve(xref:bsl/vector-0e8/size_type.adoc[size&lowbar;type] newCapacity);
----


[.small]#Created with https://www.mrdocs.com[MrDocs]#
