Set a value

Synopsis

Declared in header </boost/url/params_encoded_ref.hpp#L879[boost/url/params_encoded_ref.hpp,window=blank_]>

Description

This function replaces the value of an element at the specified position. All iterators that are equal to pos or come after are invalidated.

Note
The string passed in must not come from the element being replaced, or else the behavior is undefined.

Example

url u( "?id=42&id=69" );

u.encoded_params().set( u.encoded_params().begin(), "none" );

assert( u.encoded_query() == "id=none&id=69" );

Complexity

Linear in this->url().encoded_query().size().

Exception Safety

Strong guarantee. Calls to allocate may throw. Exceptions thrown on invalid input.

Return Value

  • iterator

Parameters

Name Type

pos

iterator

value

pct_string_view