Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext
params_base::value_type

The value type.

Synopsis
using value_type = param;
Member Functions

Name

Description

operator=

Assignment.

param

Constructor.

Data Members

Name

Description

has_value

True if a value is present.

key

The key.

param

Constructor.

value

The value.

Objects of this type represent a single key and value pair in a query string where a key is always present and may be empty, while the presence of a value is indicated by has_value equal to true. An empty value is distinct from no value. Depending on where the object was obtained, the strings may or may not contain percent escapes. For most usages, key comparisons are case-sensitive and duplicate keys in a query are possible. However, it is the authority that has final control over how the query is interpreted.

BNF
query-params    = query-param *( "&" query-param )
query-param     = key [ "=" value ]
key             = *qpchar
value           = *( qpchar / "=" )
Specification
See Also

param_view, param_pct_view.

Description

Values of this type represent parameters whose strings retain unique ownership by making a copy.

Example
params_view::value_type qp( *url_view( "?first=John&last=Doe" ).params().find( "first" ) );
See Also

param.


PrevUpHomeNext