Constructor
<include/boost/url/param.hpp>
template<class OptionalString>
param(
core::string_view key,
OptionalString const& value);
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.
param qp( "key", "value" );
param qp( "key", optional("value") );
param qp( "key", boost::none );
param qp( "key", nullptr );
param qp( "key", no_value );
this->key == key && this->value == value && this->has_value == true
Name | Description |
---|---|
OptionalString | An optional string type, such as `core::string_view`,
`std::nullptr`,
no_value_t
, or
`optional |
Name | Description |
---|---|
key, | value The key and value to set. |