[#boost-urls-url_view-2constructor] = xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::xref:boost/urls/url_view.adoc[url_view]::url_view :relfileprefix: ../../../ :mrdocs: Constructor == Synopsis Declared in `<https://www.github.com/boostorg/url/blob/develop/include/boost/url/url_view.hpp#L89[boost/url/url_view.hpp]>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:boost/urls/url_view/2constructor-00.adoc[url_view](/* implementation-defined */::url_impl const& impl) noexcept; ---- [.small]#xref:boost/urls/url_view/2constructor-00.adoc[_» more..._]# [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:boost/urls/url_view/2constructor-0c.adoc[url_view]() noexcept; ---- [.small]#xref:boost/urls/url_view/2constructor-0c.adoc[_» more..._]# [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:boost/urls/url_view/2constructor-025.adoc[url_view](core::string_view s); ---- [.small]#xref:boost/urls/url_view/2constructor-025.adoc[_» more..._]# [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class String> requires std::is_convertible< String, core::string_view >::value && !std::is_convertible< String*, url_view_base* >::value && std::is_convertible< String, core::string_view >::value && !std::is_convertible< String*, url_view_base* >::value xref:boost/urls/url_view/2constructor-00.adoc[url_view](String const& s); ---- [.small]#xref:boost/urls/url_view/2constructor-00.adoc[_» more..._]# [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:boost/urls/url_view/2constructor-024.adoc[url_view](xref:boost/urls/url_view.adoc[url_view] const& other) noexcept; ---- [.small]#xref:boost/urls/url_view/2constructor-024.adoc[_» more..._]# [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:boost/urls/url_view/2constructor-0a.adoc[url_view](xref:boost/urls/url_view_base.adoc[url_view_base] const& other) noexcept; ---- [.small]#xref:boost/urls/url_view/2constructor-0a.adoc[_» more..._]# == 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. === Example [,cpp] ---- url_view 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)] == Exceptions |=== | Name | Thrown on | `system_error` | The input failed to parse correctly. |=== == Parameters |=== | Name | Description | *s* | The string to parse. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#