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
value::swap (1 of 2 overloads)

Swap the given values.

Synopsis
void
swap(
    value& other);
Description

Exchanges the contents of this value with another value. Ownership of the respective memory_resource objects is not transferred:

Complexity

Constant or linear in the sum of the sizes of the values.

Exception Safety

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

Parameters

Name

Description

other

The value to swap with. If this == &other, this function call has no effect.


PrevUpHomeNext