[#boost-urls-segments_encoded_ref-operator_assign-02e]
= xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::xref:boost/urls/segments_encoded_ref.adoc[segments&lowbar;encoded&lowbar;ref]::operator&equals;
:relfileprefix: ../../../
:mrdocs:

Assignment

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:boost/urls/segments_encoded_ref.adoc[segments&lowbar;encoded&lowbar;ref]&
operator&equals;(xref:boost/urls/segments_encoded_view.adoc[segments&lowbar;encoded&lowbar;view] const& other);
----

== Description

The existing contents are replaced by a copy of the other segments&period;

All iterators are invalidated&period;

[NOTE]
====
None of the character buffers referenced by `other` may overlap the buffer of the underlying url, or else the behavior is undefined&period;

====

== Effects

[,cpp]
----
this->assign( other.begin(), other.end() );
----
== Complexity

Linear in `other&period;buffer()&period;size()`&period;

== Exception Safety

Strong guarantee&period; Calls to allocate may throw&period;

== Return Value

A reference to this object&period;

== Parameters

[cols=2]
|===
| Name
| Description
| *other*
| The segments to assign&period;
|===


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