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 38a454a347.
PrevUpHomeNext
basic_static_string::assign (6 of 9 overloads)

Assign to the string.

Synopsis
template<
    typename InputIterator>
constexpr basic_static_string&
assign(
    InputIterator first,
    InputIterator last);
Description

Replaces the contents with the characters in the range {first, last).

Complexity

Linear in std::distance(first, last).

Exception Safety

Strong guarantee.

Template Parameters

Type

Description

InputIterator

The type of the iterators.

Constraints

InputIteratorsatisfies InputIterator.

Return Value

*this

Parameters

Name

Description

first

An iterator referring to the first character to assign.

last

An iterator past the end of the range to assign from.

Exceptions

Type

Thrown On

std::length_error

std::distance(first, last) > max_size().


PrevUpHomeNext