[#boost-urls-static_url-2constructor] = xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::xref:boost/urls/static_url.adoc[static_url]::static_url :relfileprefix: ../../../ :mrdocs: Constructor == Synopsis Declared in `<https://www.github.com/boostorg/url/blob/develop/include/boost/url/static_url.hpp#L165[boost/url/static_url.hpp]>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:boost/urls/static_url/2constructor-098.adoc[static_url]() noexcept; ---- [.small]#xref:boost/urls/static_url/2constructor-098.adoc[_» more..._]# [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:boost/urls/static_url/2constructor-08.adoc[static_url](core::string_view s); ---- [.small]#xref:boost/urls/static_url/2constructor-08.adoc[_» more..._]# [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:boost/urls/static_url/2constructor-09f.adoc[static_url](xref:boost/urls/static_url.adoc[static_url] const& u) noexcept; ---- [.small]#xref:boost/urls/static_url/2constructor-09f.adoc[_» more..._]# [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:boost/urls/static_url/2constructor-0b.adoc[static_url](xref:boost/urls/url_view_base.adoc[url_view_base] const& u); ---- [.small]#xref:boost/urls/static_url/2constructor-0b.adoc[_» more..._]# == Description Default constructed urls contain a zero‐length string. This matches the grammar for a relative‐ref with an empty path and no query or fragment. === Example [,cpp] ---- static_url< 1024 > u; ---- === Postconditions [,cpp] ---- this->empty() == true ---- === Complexity Constant. === Exception Safety Throws nothing. === BNF [,cpp] ---- relative-ref = relative-part [ "?" query ] [ "#" fragment ] ---- === Specification link:https://datatracker.ietf.org/doc/html/rfc3986#section-4.2[4.2. Relative Reference (rfc3986)] == Exceptions |=== | Name | Thrown on | `system_error` | The input does not contain a valid url. |=== == Parameters |=== | Name | Description | *s* | The string to parse. | *u* | The url to copy. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#