[#boost-urls-url-operator_assign]
= xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::xref:boost/urls/url.adoc[url]::operator&equals;
:relfileprefix: ../../../
:mrdocs:


Assignment

== Synopsis


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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:boost/urls/url.adoc[url]&
xref:boost/urls/url/operator_assign-09.adoc[operator&equals;](xref:boost/urls/url.adoc[url]&& u) noexcept;
----

[.small]#xref:boost/urls/url/operator_assign-09.adoc[_» more..._]#

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:boost/urls/url.adoc[url]&
xref:boost/urls/url/operator_assign-0b.adoc[operator&equals;](xref:boost/urls/url_view_base.adoc[url&lowbar;view&lowbar;base] const& u);
----

[.small]#xref:boost/urls/url/operator_assign-0b.adoc[_» more..._]#

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:boost/urls/url.adoc[url]&
xref:boost/urls/url/operator_assign-06.adoc[operator&equals;](xref:boost/urls/url.adoc[url] const& u);
----

[.small]#xref:boost/urls/url/operator_assign-06.adoc[_» more..._]#

== Description


The contents of `u` are transferred to        `this`, including the underlying        character buffer&period; The previous contents        of `this` are destroyed&period;        After assignment, the moved&hyphen;from        object is as if default constructed&period;


=== Postconditions

[,cpp]
----
u.empty() == true
----

=== Complexity

Constant&period;


=== Exception Safety

Throws nothing&period;



== Exceptions


|===
| Name | Thrown on

| `std&colon;&colon;length&lowbar;error`
| `u&period;size() &gt; max&lowbar;size()`&period;


|===

== Parameters


|===
| Name | Description

| *u*
| The url to assign from&period;


|===



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