[#boost-urls-param_pct_view-2constructor] = xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::xref:boost/urls/param_pct_view.adoc[param_pct_view]::param_pct_view :relfileprefix: ../../../ :mrdocs: Constructor == Synopsis Declared in `<https://www.github.com/boostorg/url/blob/develop/include/boost/url/param.hpp#L697[boost/url/param.hpp]>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- constexpr xref:boost/urls/param_pct_view/2constructor-00.adoc[param_pct_view]() = default; ---- [.small]#xref:boost/urls/param_pct_view/2constructor-00.adoc[_» more..._]# [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:boost/urls/param_pct_view/2constructor-0e.adoc[param_pct_view]( xref:boost/urls/pct_string_view.adoc[pct_string_view] key, xref:boost/urls/pct_string_view.adoc[pct_string_view] value) noexcept; ---- [.small]#xref:boost/urls/param_pct_view/2constructor-0e.adoc[_» more..._]# [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class OptionalString> xref:boost/urls/param_pct_view/2constructor-05.adoc[param_pct_view]( xref:boost/urls/pct_string_view.adoc[pct_string_view] key, OptionalString const& value); ---- [.small]#xref:boost/urls/param_pct_view/2constructor-05.adoc[_» more..._]# [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:boost/urls/param_pct_view/2constructor-03.adoc[param_pct_view](xref:boost/urls/param_view.adoc[param_view] const& p); ---- [.small]#xref:boost/urls/param_pct_view/2constructor-03.adoc[_» more..._]# [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:boost/urls/param_pct_view/2constructor-02.adoc[param_pct_view]( xref:boost/urls/pct_string_view.adoc[pct_string_view] key, xref:boost/urls/pct_string_view.adoc[pct_string_view] value, bool has_value) noexcept; ---- [.small]#xref:boost/urls/param_pct_view/2constructor-02.adoc[_» more..._]# == Description Default constructed query parameters have an empty key and no value. === Example [,cpp] ---- param_pct_view qp; ---- === Postconditions [,cpp] ---- this->key == "" && this->value == "" && this->has_value == false ---- === Complexity Constant. === Exception Safety Throws nothing. == Exceptions |=== | Name | Thrown on | `system_error` | `key` or `value` contains an invalid percent‐encoding. |=== == Template Parameters |=== | Name | Description | *OptionalString* | An optional `core::string_view` type, such as `boost::optional<core::string_view>` or `std::optional<core::string_view>`. |=== == Parameters |=== | Name | Description | *key,* | value The key and value to set. | *p* | The param to construct from. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#