Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext
string::operator= (2 of 4 overloads)

Move assignment.

Synopsis
string&
operator=(
    string&& other);
Description

Replace the contents with those of other using move semantics.

Complexity

Constant or linear in other.size().

Exception Safety

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

Return Value

*this

Parameters

Name

Description

other

The string to use as a source to move from.


PrevUpHomeNext