[#boost-urls-param_pct_view-2constructor-03]
= 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:


Construction

== Synopsis


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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
param&lowbar;pct&lowbar;view(xref:boost/urls/param_view.adoc[param&lowbar;view] const& p);
----

== Description


This converts a param which may        contain unvalidated percent&hyphen;escapes into        a param whose key and value are        guaranteed to contain strings with no        invalid percent&hyphen;escapes, otherwise        an exception is thrown&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( param_view( "key", "value" ) );
----

=== Complexity

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


=== Exception Safety

Exceptions thrown on invalid input&period;



== Exceptions


|===
| Name | Thrown on

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


|===

== Parameters


|===
| Name | Description

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


|===



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