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

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

  


Constructor



=== Synopsis
  

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

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

[source,cpp,subs="verbatim,macros,-callouts"]
----
template<
    class String,
    class = void>
xref:boost/urls/url_view/2constructor-00.adoc[pass:[url_view]](String const& s);
----

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

[source,cpp,subs="verbatim,macros,-callouts"]
----
xref:boost/urls/url_view/2constructor-0a.adoc[pass:[url_view]](xref:boost/urls/url_view_base.adoc[url_view_base] const& other) noexcept;
----
  
=== Description


Default constructed views refer to
a string with zero length, which
always remains valid. This matches
the grammar for a relative-ref with
an empty path and no query or
fragment.
[,cpp]
----
url_view 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 failed to parse correctly.

|===


=== Parameters

|===
| Name | Description 

| *s*
| 
The string to parse.

|===




