[#boost-urls-url-2constructor-0f0]
= xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::xref:boost/urls/url.adoc[url]::url
:relfileprefix: ../../../
:mrdocs:


Constructor

== Synopsis


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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
url() noexcept;
----

== Description


Default constructed urls contain        a zero&hyphen;length string&period; This matches        the grammar for a relative&hyphen;ref with        an empty path and no query or        fragment&period;


=== Example

[,cpp]
----
url u;
----

=== Postconditions

[,cpp]
----
this->empty() == true
----

=== Complexity

Constant&period;


=== Exception Safety

Throws nothing&period;


=== BNF

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

=== Specification

link:https://datatracker.ietf.org/doc/html/rfc3986#section-4.2[4&period;2&period; Relative Reference (rfc3986)]





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