[#boost-urls-pct_string_view-2constructor-02]
= xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::xref:boost/urls/pct_string_view.adoc[pct_string_view]::pct_string_view
:relfileprefix: ../../../
:mrdocs:


== Synopsis


Declared in `<https://www.github.com/boostorg/url/blob/develop/include/boost/url/pct_string_view.hpp#L230[boost/url/pct_string_view.hpp]>`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
constexpr
xref:boost/urls/pct_string_view/2constructor-00.adoc[pct_string_view]() = default;
----

[.small]#xref:boost/urls/pct_string_view/2constructor-00.adoc[_» more..._]#

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
constexpr
xref:boost/urls/pct_string_view/2constructor-07.adoc[pct_string_view](xref:boost/urls/pct_string_view.adoc[pct_string_view] const& other) = default;
----

[.small]#xref:boost/urls/pct_string_view/2constructor-07.adoc[_» more..._]#

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template<std::convertible_to<core::string_view> String>
requires std::is_convertible<
                String,
                core::string_view
                    >::value
constexpr
xref:boost/urls/pct_string_view/2constructor-0c7.adoc[pct_string_view](String const& s);
----

[.small]#xref:boost/urls/pct_string_view/2constructor-0c7.adoc[_» more..._]#

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:boost/urls/pct_string_view/2constructor-0f.adoc[pct_string_view](std::nullptr_t) = delete;
----

[.small]#xref:boost/urls/pct_string_view/2constructor-0f.adoc[_» more..._]#

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:boost/urls/pct_string_view/2constructor-06.adoc[pct_string_view](
    char const* s,
    std::size_t len);
----

[.small]#xref:boost/urls/pct_string_view/2constructor-06.adoc[_» more..._]#

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:boost/urls/pct_string_view/2constructor-0d.adoc[pct_string_view](core::string_view s);
----

[.small]#xref:boost/urls/pct_string_view/2constructor-0d.adoc[_» more..._]#

== Exceptions


|===
| Name | Thrown on

| `system_error`
| The string contains an invalid percent encoding.


|===

== Template Parameters


|===
| Name | Description

| *String*
| A type convertible to `core::string_view`


|===

== Parameters


|===
| Name | Description

| *s*
| The string to construct from.


| *len*
| The length of the string.


|===



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