:relfileprefix: ../../../
[#boost-urls-url-2constructor-0f0]

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


Constructor


== Synopsis

Declared in header `<https://www.github.com/boostorg/url/blob/develop/include/boost/url/url.hpp#L120[boost/url/url.hpp,window=blank_]>`

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

== 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]
----
url 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)]








