:relfileprefix: ../../../ [#boost-urls-param-2constructor-0b] == xref:boost.adoc[pass:[boost]]::xref:boost/urls.adoc[pass:[urls]]::xref:boost/urls/param.adoc[pass:[param]]::param Constructor === Synopsis Declared in header `` [source,cpp,subs="verbatim,macros,-callouts"] ---- template param( core::string_view key, OptionalString const& value); ---- === Description This constructs a parameter with a key and value. No validation is performed on the strings. Ownership of the key and value is acquired by making copies. [,cpp] ---- param qp( "key", "value" ); ---- [,cpp] ---- param qp( "key", optional("value") ); ---- [,cpp] ---- param qp( "key", boost::none ); ---- [,cpp] ---- param qp( "key", nullptr ); ---- [,cpp] ---- param qp( "key", no_value ); ---- [,cpp] ---- this->key == key && this->value == value && this->has_value == true ---- === Linear in `key.size() + value.size()`. === Calls to allocate may throw. === Parameters |=== | Name | Description | *key,* | value The key and value to set. |===