[#boost-urls-params_encoded_ref-operator_assign-03]
= xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::xref:boost/urls/params_encoded_ref.adoc[params&lowbar;encoded&lowbar;ref]::operator&equals;
:relfileprefix: ../../../
:mrdocs:


Assignment

== Synopsis


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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:boost/urls/params_encoded_ref.adoc[params&lowbar;encoded&lowbar;ref]&
operator&equals;(std::initializer&lowbar;list&lt;xref:boost/urls/param_pct_view.adoc[param&lowbar;pct&lowbar;view]&gt; init);
----

== Description


After assignment, the previous contents        of the query parameters are replaced by        the contents of the initializer&hyphen;list&period;

All iterators are invalidated&period;


=== Preconditions

None of character buffers referenced by        `init` may overlap the character buffer of        the underlying url, or else the behavior        is undefined&period;


=== Effects

[,cpp]
----
this->assign( init.begin(), init.end() );
----

=== Complexity

Linear in `init&period;size()`&period;


=== Exception Safety

Strong guarantee&period;        Calls to allocate may throw&period;        Exceptions thrown on invalid input&period;



== Exceptions


|===
| Name | Thrown on

| `system&lowbar;error`
| `init` contains an invalid percent&hyphen;encoding&period;


|===

== Parameters


|===
| Name | Description

| *init*
| The list of params to assign&period;


|===



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