[#boost-urls-param_pct_view-2constructor]
= xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::xref:boost/urls/param_pct_view.adoc[param&lowbar;pct&lowbar;view]::param&lowbar;pct&lowbar;view
:relfileprefix: ../../../
:mrdocs:


Constructor

== Synopsis


Declared in `&lt;https://www.github.com/boostorg/url/blob/develop/include/boost/url/param.hpp#L697[boost&sol;url&sol;param&period;hpp]&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
constexpr
xref:boost/urls/param_pct_view/2constructor-00.adoc[param&lowbar;pct&lowbar;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&lowbar;pct&lowbar;view](
    xref:boost/urls/pct_string_view.adoc[pct&lowbar;string&lowbar;view] key,
    xref:boost/urls/pct_string_view.adoc[pct&lowbar;string&lowbar;view] value) noexcept;
----

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class OptionalString&gt;
xref:boost/urls/param_pct_view/2constructor-05.adoc[param&lowbar;pct&lowbar;view](
    xref:boost/urls/pct_string_view.adoc[pct&lowbar;string&lowbar;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&lowbar;pct&lowbar;view](xref:boost/urls/param_view.adoc[param&lowbar;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&lowbar;pct&lowbar;view](
    xref:boost/urls/pct_string_view.adoc[pct&lowbar;string&lowbar;view] key,
    xref:boost/urls/pct_string_view.adoc[pct&lowbar;string&lowbar;view] value,
    bool has&lowbar;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&period;


=== Example

[,cpp]
----
param_pct_view qp;
----

=== Postconditions

[,cpp]
----
this->key == "" && this->value == "" && this->has_value == false
----

=== Complexity

Constant&period;


=== Exception Safety

Throws nothing&period;



== Exceptions


|===
| Name | Thrown on

| `system&lowbar;error`
| `key` or `value` contains an invalid percent&hyphen;encoding&period;


|===

== Template Parameters


|===
| Name | Description

| *OptionalString*
| An optional        `core&colon;&colon;string&lowbar;view` type, such as        `boost&colon;&colon;optional&lt;core&colon;&colon;string&lowbar;view&gt;` or        `std&colon;&colon;optional&lt;core&colon;&colon;string&lowbar;view&gt;`&period;


|===

== Parameters


|===
| Name | Description

| *key,*
| value The key and value to set&period;


| *p*
| The param to construct from&period;


|===



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