[#boost-urls-param_pct_view-2constructor-0e]
= 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#L762[boost&sol;url&sol;param&period;hpp]&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
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;
----

== Description

This constructs a parameter with a key and value, which may both contain percent escapes&period; The new key and value reference the same corresponding underlying character buffers&period; Ownership of the buffers is not transferred&semi; the caller is responsible for ensuring that the assigned buffers remain valid until they are no longer referenced&period;

== Example

[,cpp]
----
param_pct_view qp( "key", "value" );
----
== Postconditions

[,cpp]
----
this->key.data() == key.data() && this->value.data() == value.data() && this->has_value == true
----
== Complexity

Linear in `key&period;size() &plus; value&period;size()`&period;

== Exception Safety

Exceptions thrown on invalid input&period;

== Exceptions

[cols=2]
|===
| Name
| Thrown on
| `system&lowbar;error`
| `key` or `value` contains an invalid percent&hyphen;encoding&period;
|===

== Parameters

[cols=2]
|===
| Name
| Description
| *key*
| The key to set&period;
| *value*
| The value to set&period;
|===


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