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 7789ef3d8d.
PrevUpHomeNext
key_value_pair::key_value_pair (4 of 7 overloads)

Pilfer constructor.

Synopsis
key_value_pair(
    pilfered< key_value_pair > other);
Description

The pair is constructed by acquiring ownership of the contents of other using pilfer semantics. This is more efficient than move construction, when it is known that the moved-from object will be immediately destroyed afterwards.

Complexity

Constant.

Exception Safety

No-throw guarantee.

Parameters

Name

Description

other

The value to pilfer. After pilfer construction, other is not in a usable state and may only be destroyed.

See Also

pilfer, Valueless Variants Considered Harmful


PrevUpHomeNext