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 an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext
string::string (10 of 12 overloads)

Move constructor.

Synopsis
string(
    string&& other);
Description

Constructs the string with the contents of other using move semantics. Ownership of the underlying memory is transferred. The container acquires shared ownership of the memory_resource used by other. After construction, the moved-from string behaves as if newly constructed with its current memory resource.

Complexity

Constant.

Parameters

Name

Description

other

The string to move


PrevUpHomeNext