[#boost-urls-segments_ref-operator_assign-0d]
= xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::xref:boost/urls/segments_ref.adoc[segments&lowbar;ref]::operator&equals;
:relfileprefix: ../../../
:mrdocs:


Assignment

== Synopsis


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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:boost/urls/segments_ref.adoc[segments&lowbar;ref]&
operator&equals;(xref:boost/urls/segments_ref.adoc[segments&lowbar;ref] 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;



== Parameters


|===
| Name | Description

| *other*
| The segments to assign&period;


|===



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