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


Assignment

== Synopsis


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

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

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

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

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

== Description


The contents of `u` are copied and        the previous contents of `this` are        discarded&period;        Capacity remains unchanged&period;


=== Postconditions

[,cpp]
----
this->buffer() == u.buffer() && this->buffer().data() != u.buffer().data()
----

=== Complexity

Linear in `u&period;size()`&period;


=== Exception Safety

Throws nothing&period;



== Exceptions


|===
| Name | Thrown on

| `system&lowbar;error`
| Capacity would be exceeded&period;


|===

== Parameters


|===
| Name | Description

| *u*
| The url to copy&period;


|===



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