:relfileprefix: ../../../
[#boost-urls-segments_encoded_ref-operator_assign]

== xref:boost.adoc[pass:[boost]]::xref:boost/urls.adoc[pass:[urls]]::xref:boost/urls/segments_encoded_ref.adoc[pass:[segments_encoded_ref]]::operator=

  


Assignment



=== Synopsis
  

[source,cpp,subs="verbatim,macros,-callouts"]
----
xref:boost/urls/segments_encoded_ref.adoc[segments_encoded_ref]&
xref:boost/urls/segments_encoded_ref/operator_assign-02c.adoc[pass:[operator=]](xref:boost/urls/segments_encoded_ref.adoc[segments_encoded_ref] const& other);
----

[source,cpp,subs="verbatim,macros,-callouts"]
----
xref:boost/urls/segments_encoded_ref.adoc[segments_encoded_ref]&
xref:boost/urls/segments_encoded_ref/operator_assign-02e.adoc[pass:[operator=]](xref:boost/urls/segments_encoded_view.adoc[segments_encoded_view] const& other);
----

[source,cpp,subs="verbatim,macros,-callouts"]
----
xref:boost/urls/segments_encoded_ref.adoc[segments_encoded_ref]&
xref:boost/urls/segments_encoded_ref/operator_assign-08.adoc[pass:[operator=]](std::initializer_list<xref:boost/urls/pct_string_view.adoc[pct_string_view]> init);
----
  
=== Description


The existing contents are replaced
by a copy of the other segments.



All iterators are invalidated.
[NOTE]

None of the character buffers referenced
by `other` may overlap the buffer of the
underlying url, or else the behavior
is undefined.
[,cpp]
----
this->assign( other.begin(), other.end() );
----

=== Linear in `other.buffer().size()`.

=== Strong guarantee.

Calls to allocate may throw.

@{


=== Exceptions

|===
| Name | Thrown on

| `The`
| 
list contains an invalid percent-encoding.

|===


=== Parameters

|===
| Name | Description 

| *other*
| 
The segments to assign.

| *init*
| 
The list of segments to assign.

|===




