:relfileprefix: ../../../
[#boost-urls-static_url-2constructor]

== xref:boost.adoc[pass:[boost]]::xref:boost/urls.adoc[pass:[urls]]::xref:boost/urls/static_url.adoc[pass:[static_url]]::static_url

  


Constructor



=== Synopsis
  

[source,cpp,subs="verbatim,macros,-callouts"]
----
xref:boost/urls/static_url/2constructor-098.adoc[pass:[static_url]]() noexcept;
----

[source,cpp,subs="verbatim,macros,-callouts"]
----
explicit
xref:boost/urls/static_url/2constructor-08.adoc[pass:[static_url]](core::string_view s);
----

[source,cpp,subs="verbatim,macros,-callouts"]
----
xref:boost/urls/static_url/2constructor-09f.adoc[pass:[static_url]](xref:boost/urls/static_url.adoc[static_url] const& u) noexcept;
----

[source,cpp,subs="verbatim,macros,-callouts"]
----
xref:boost/urls/static_url/2constructor-0b.adoc[pass:[static_url]](xref:boost/urls/url_view_base.adoc[url_view_base] const& u);
----
  
=== 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.
[,cpp]
----
static_url< 1024 > u;
----
[,cpp]
----
this->empty() == true
----

=== Constant.

=== Throws nothing.
[,cpp]
----
relative-ref  = relative-part [ "?" query ] [ "#" fragment ]
----

=== 4.2. Relative Reference (rfc3986)


=== Exceptions

|===
| Name | Thrown on

| `The`
| 
input does not contain a valid url.

| `Capacity`
| 
would be exceeded.

|===


=== Parameters

|===
| Name | Description 

| *s*
| 
The string to parse.

| *u*
| 
The url to copy.

|===




