[#boost-urls-segments_encoded_ref-assign-00]
= xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::xref:boost/urls/segments_encoded_ref.adoc[segments&lowbar;encoded&lowbar;ref]::assign
:relfileprefix: ../../../
:mrdocs:

Assign segments

== Synopses

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

Assign segments


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:boost/urls/segments_encoded_ref/assign-0e.adoc[assign](std::initializer&lowbar;list&lt;xref:boost/urls/pct_string_view.adoc[pct&lowbar;string&lowbar;view]&gt; init);
----

[.small]#xref:boost/urls/segments_encoded_ref/assign-0e.adoc[_» more&period;&period;&period;_]#

Assign segments


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class FwdIt&gt;
void
xref:boost/urls/segments_encoded_ref/assign-0b.adoc[assign](
    FwdIt first,
    FwdIt last);
----

[.small]#xref:boost/urls/segments_encoded_ref/assign-0b.adoc[_» more&period;&period;&period;_]#

== Exceptions

[cols=2]
|===
| Name
| Thrown on
| `system&lowbar;error`
| The list contains an invalid percent&hyphen;encoding&period;
|===

== Parameters

[cols=2]
|===
| Name
| Description
| *init*
| The list of segments to assign&period;
| *first*
| The first element in the range&period;
| *last*
| One past the last element in the range&period;
|===


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