:relfileprefix: ../../../ [#boost-urls-segments_ref-operator_assign] == xref:boost.adoc[pass:[boost]]::xref:boost/urls.adoc[pass:[urls]]::xref:boost/urls/segments_ref.adoc[pass:[segments_ref]]::operator= Assignment === Synopsis [source,cpp,subs="verbatim,macros,-callouts"] ---- xref:boost/urls/segments_ref.adoc[segments_ref]& xref:boost/urls/segments_ref/operator_assign-0d.adoc[pass:[operator=]](xref:boost/urls/segments_ref.adoc[segments_ref] const& other); ---- [source,cpp,subs="verbatim,macros,-callouts"] ---- xref:boost/urls/segments_ref.adoc[segments_ref]& xref:boost/urls/segments_ref/operator_assign-08.adoc[pass:[operator=]](xref:boost/urls/segments_view.adoc[segments_view] const& other); ---- [source,cpp,subs="verbatim,macros,-callouts"] ---- xref:boost/urls/segments_ref.adoc[segments_ref]& xref:boost/urls/segments_ref/operator_assign-0f.adoc[pass:[operator=]](std::initializer_list 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. @{ === Parameters |=== | Name | Description | *other* | The segments to assign. | *init* | The list of segments to assign. |===