![]() |
Home | Libraries | People | FAQ | More |
Constructor.
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.
[link url.ref.boost__urls__param.param `param`] qp( "key" , "value" );
[link url.ref.boost__urls__param.param `param`] qp( "key" , optional<core::string_view>( "value" ) );
[link url.ref.boost__urls__param.param `param`] qp( "key" , boost::none );
[link url.ref.boost__urls__param.param `param`] qp( "key" , nullptr );
[link url.ref.boost__urls__param.param `param`] qp( "key" , [link url.ref.boost__urls__no_value `no_value`] );
this->[link url.ref.boost__urls__param.key `key`] == [link url.ref.boost__urls__param.key `key`] && this->[link url.ref.boost__urls__param.value `value`] == value && this->[link url.ref.boost__urls__param.has_value `has_value`] == true
Linear in key.size() + value.size()
.
Calls to allocate may throw.
Type |
Description |
---|---|
|
An optional string type, such as core::string_view, |
Name |
Description |
---|---|
|
The key and value to set. |