[#boost-urls-url_base-reserve]
= xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::xref:boost/urls/url_base.adoc[url&lowbar;base]::reserve
:relfileprefix: ../../../
:mrdocs:


Adjust the capacity without changing the size

== Synopsis


Declared in `&lt;https://www.github.com/boostorg/url/blob/develop/include/boost/url/url_base.hpp#L188[boost&sol;url&sol;url&lowbar;base&period;hpp]&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
reserve(std::size&lowbar;t n);
----

== Description


This function adjusts the capacity        of the container in characters, without        affecting the current contents&period; Has        no effect if `n &lt;&equals; this&hyphen;&gt;capacity()`&period;


=== Exception Safety

Strong guarantee&period;        Calls to allocate may throw&period;



== Exceptions


|===
| Name | Thrown on

| `bad&lowbar;alloc`
| Allocation failure


|===

== Parameters


|===
| Name | Description

| *n*
| The capacity in characters,        excluding any null terminator&period;


|===



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