boost::urls::param::param
Constructor
Synopsis
Declared in <include/boost/url/param.hpp>
template<class OptionalString>
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.
param qp( "key", "value" );
param qp( "key", optional<core::string_view>("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
Template Parameters
Name | Description |
---|---|
OptionalString |
An optional string type, such as &grave;core&colon;&colon;string&lowbar;view&grave;, &grave;std&colon;&colon;nullptr&grave;, xref:boost/urls/no_value_t.adoc[no&lowbar;value&lowbar;t] , or &grave;optional<;core&colon;&colon;string&lowbar;view>;&grave;&period; |
Parameters
Name | Description |
---|---|
key, |
value The key and value to set&period; |
Created with MrDocs