Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext
param_view::param_view (1 of 5 overloads)

Constructor.

Synopsis
param_view(
    string_view key,
    no_value_t);
Description

This constructs a parameter with a key and no value. No validation is performed on the strings. The new key will reference the same underlying character buffer. Ownership of the buffers is not transferred; the caller is responsible for ensuring that the assigned buffers remain valid until they are no longer referenced.

Example
param_view qp( "key" );
Postconditions
this->key.data() == key.data() && this->value == "" && this->has_value == false
Complexity

Constant.

Exception Safety

Throws nothing.

Parameters

Name

Description

key

The key to set.

See Also

no_value.


PrevUpHomeNext