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 3785d1f795.
PrevUpHomeNext
basic_static_string::assign (2 of 9 overloads)

Assign to the string.

Synopsis
template<
    std::size_t M>
constexpr basic_static_string&
assign(
    const basic_static_string< M, CharT, Traits >& s);
Description

Replaces the contents with those of the string s.

Complexity

Linear in s.size().

Exception Safety

Strong guarantee.

Template Parameters

Type

Description

M

The size of the other string.

Return Value

*this

Parameters

Name

Description

s

The string to replace the contents with.

Exceptions

Type

Thrown On

std::length_error

s.size() > max_size().


PrevUpHomeNext