:relfileprefix: ../../../
[#boost-urls-param_pct_view-2constructor]

== xref:boost.adoc[pass:[boost]]::xref:boost/urls.adoc[pass:[urls]]::xref:boost/urls/param_pct_view.adoc[pass:[param_pct_view]]::param_pct_view

  


Constructor



=== Synopsis
  

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

[source,cpp,subs="verbatim,macros,-callouts"]
----
xref:boost/urls/param_pct_view/2constructor-0e.adoc[pass:[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;
----

[source,cpp,subs="verbatim,macros,-callouts"]
----
template<class OptionalString>
xref:boost/urls/param_pct_view/2constructor-05.adoc[pass:[param_pct_view]](
    xref:boost/urls/pct_string_view.adoc[pct_string_view] key,
    OptionalString const& value);
----

[source,cpp,subs="verbatim,macros,-callouts"]
----
explicit
xref:boost/urls/param_pct_view/2constructor-03.adoc[pass:[param_pct_view]](xref:boost/urls/param_view.adoc[param_view] const& p);
----

[source,cpp,subs="verbatim,macros,-callouts"]
----
xref:boost/urls/param_pct_view/2constructor-02.adoc[pass:[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;
----
  
=== Description


Default constructed query parameters
have an empty key and no value.
[,cpp]
----
param_pct_view qp;
----
[,cpp]
----
this->key == "" && this->value == "" && this->has_value == false
----

=== Constant.

=== Throws nothing.


=== Exceptions

|===
| Name | Thrown on

| ``key``
| 
or `value` contains an invalid percent-encoding.

|===


=== Parameters

|===
| Name | Description 

| *key,*
| 
value The key and value to set.

| *p*
| 
The param to construct from.

|===




