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 develop branch, built from commit adcd4c09f0.
PrevUpHomeNext
basic_static_string::insert (8 of 11 overloads)

Insert into the string.

Synopsis
template<
    typename InputIterator>
constexpr iterator
insert(
    const_iterator pos,
    InputIterator first,
    InputIterator last);
Description

Inserts characters from the range {first, last) before the character pointed to by pos.

Precondition

posshall be valid within {data(), data() + size()}, {first, last) shall be a valid range

Exception Safety

Strong guarantee.

Remarks

All references, pointers, or iterators referring to contained elements are invalidated. Any past-the-end iterators are also invalidated.

Template Parameters

Type

Description

InputIterator

The type of the iterators.

Constraints

InputIteratorsatisfies InputIterator and does not satisfy ForwardIterator.

Return Value

An iterator which refers to the first inserted character or pos if no characters were inserted

Parameters

Name

Description

pos

The position to insert at.

first

An iterator representing the first character to insert.

last

An iterator representing one past the last character to insert.

Exceptions

Type

Thrown On

std::length_error

size() + insert_count > max_size()


PrevUpHomeNext