Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext
basic_static_string::assign (6 of 9 overloads)

Assign to the string.

Synopsis
template<
    [role red error.param neither has a declname nor a 'class ' prefix in the type][role red error.param neither has a declname nor a 'class ' prefix in the type][role red error.param neither has a declname nor a 'class ' prefix in the type][role red error.param neither has a declname nor a 'class ' prefix in the type]>
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