[#boost-urls-url_view_base-empty]
= xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::xref:boost/urls/url_view_base.adoc[url&lowbar;view&lowbar;base]::empty
:relfileprefix: ../../../
:mrdocs:


Return true if the url is empty

== Synopsis


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

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

== Description


The empty string matches the        _relative&hyphen;ref_ grammar&period;


=== Example

[,cpp]
----
assert( url_view( "" ).empty() );
----

=== Complexity

Constant&period;


=== Exception Safety

Throws nothing&period;


=== BNF

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

relative-part = "//" authority path-abempty
              / path-absolute
              / path-noscheme
              / path-empty
----

=== Specification

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

Return true if the url is empty

The empty string matches the        _relative&hyphen;ref_ grammar&period;


=== Example

[,cpp]
----
assert( url_view( "" ).empty() );
----

=== Complexity

Constant&period;


=== Exception Safety

Throws nothing&period;


=== BNF

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

relative-part = "//" authority path-abempty
              / path-absolute
              / path-noscheme
              / path-empty
----

=== 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]#
