Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for a snapshot of the master branch, built from commit 7789ef3d8d.
PrevUpHomeNext
segments_encoded_ref::insert (1 of 3 overloads)

Insert segments.

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

This function inserts a segment before the specified position. Reserved characters in the segment are automatically escaped. Escapes in the segment are preserved.

All iterators that are equal to before or come after are invalidated.

Complexity

Linear in s.size() + this->url().encoded_resource().size().

Exception Safety

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

Exceptions

Type

Thrown On

system_error

The segment contains an invalid percent-encoding.

Return Value

An iterator to the inserted segment.

Parameters

Name

Description

before

An iterator before which the segment is inserted. This may be equal to end().

s

The segment to insert.


PrevUpHomeNext