:relfileprefix: ../../../
[#boost-urls-url_base-reserve]

== xref:boost.adoc[pass:[boost]]::xref:boost/urls.adoc[pass:[urls]]::xref:boost/urls/url_base.adoc[pass:[url_base]]::reserve


Adjust the capacity without changing the size


=== Synopsis

Declared in header `<https://www.github.com/boostorg/url/blob/develop/include/boost/url/url_base.hpp#L188[boost/url/url_base.hpp,window=blank_]>`

[source,cpp,subs="verbatim,macros,-callouts"]
----
void
reserve(std::size_t n);
----

=== Description


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

=== Strong guarantee.

Calls to allocate may throw.



=== Exceptions

|===
| Name | Thrown on

| `Allocation`
| 
failure

|===



=== Parameters

|===
| Name | Description 

| *n*
| 
The capacity in characters,
excluding any null terminator.

|===




