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 68cc668162.
PrevUpHomeNext
string::operator= (3 of 4 overloads)

Assign a value to the string.

Synopsis
string&
operator=(
    char const* s);
Description

Replaces the contents with those of the null terminated string pointed to by s. The length of the string is determined by the first null character.

Complexity

Linear in std::strlen(s).

Exception Safety

Strong guarantee. Calls to memory_resource::allocate may throw.

Return Value

*this

Parameters

Name

Description

s

The null-terminated character string.

Exceptions

Type

Thrown On

boost::system::system_error

std::strlen(s) > max_size().


PrevUpHomeNext