Boost.URL Logo

PrevUpHomeNext
segments::insert (1 of 3 overloads)

Insert an element.

Synopsis
iterator
insert(
    iterator before,
    string_view s);
Description

This function inserts a segment specified by the percent-encoded string s, at the position preceding before. The string must contain a valid percent-encoding, or else an exception is thrown. All references and iterators starting from the newly inserted element and up to and including the last element and end iterators are invalidated.

Exception Safety

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

Return Value

An iterator pointing to the inserted value.

Parameters

Name

Description

before

An iterator before which the new element should be inserted.

s

A valid percent-encoded string to be inserted.

Exceptions

Type

Thrown On

std::invalid_argument

invalid percent-encoding


PrevUpHomeNext