[#boost-urls-params_encoded_ref-insert-0e]
= xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::xref:boost/urls/params_encoded_ref.adoc[params&lowbar;encoded&lowbar;ref]::insert
:relfileprefix: ../../../
:mrdocs:

Insert params

== Synopses

Declared in `&lt;https://www.github.com/boostorg/url/blob/develop/include/boost/url/params_encoded_ref.hpp#Lundefined[boost&sol;url&sol;params&lowbar;encoded&lowbar;ref&period;hpp]&gt;`

Insert params


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:boost/urls/params_encoded_base/iterator.adoc[iterator]
xref:boost/urls/params_encoded_ref/insert-0b4.adoc[insert](
    xref:boost/urls/params_encoded_base/iterator.adoc[iterator] before,
    std::initializer&lowbar;list&lt;param&lowbar;pct&lowbar;view&gt; init);
----

[.small]#xref:boost/urls/params_encoded_ref/insert-0b4.adoc[_» more&period;&period;&period;_]#

Insert params


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:boost/urls/params_encoded_base/iterator.adoc[iterator]
xref:boost/urls/params_encoded_ref/insert-03ed.adoc[insert](
    xref:boost/urls/params_encoded_base/iterator.adoc[iterator] before,
    xref:boost/urls/param_pct_view.adoc[param&lowbar;pct&lowbar;view] const& p);
----

[.small]#xref:boost/urls/params_encoded_ref/insert-03ed.adoc[_» more&period;&period;&period;_]#

Insert params


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class FwdIt&gt;
xref:boost/urls/params_encoded_base/iterator.adoc[iterator]
xref:boost/urls/params_encoded_ref/insert-05.adoc[insert](
    xref:boost/urls/params_encoded_base/iterator.adoc[iterator] before,
    FwdIt first,
    FwdIt last);
----

[.small]#xref:boost/urls/params_encoded_ref/insert-05.adoc[_» more&period;&period;&period;_]#

== Exceptions

[cols="1,4"]
|===
| Name
| Thrown on
| `system&lowbar;error`
| `init` contains an invalid percent&hyphen;encoding&period;
|===

== Return Value

* An iterator to the first element inserted, or `before` if `init&period;size() &equals;&equals; 0`&period;
* An iterator to the inserted element&period;
* An iterator to the first element inserted, or `before` if `first &equals;&equals; last`&period;
* An iterator to the first element inserted&period;

== Parameters

[cols="1,4"]
|===
|Name|Description

| *before*
| An iterator before which the element is inserted&period; This may be equal to `end()`&period;
| *init*
| The list of params to insert&period;
| *p*
| The param to insert&period;
| *first*
| The first element to insert&period;
| *last*
| One past the last element to insert&period;
|===


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