Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext
value::value (23 of 35 overloads)

Construct a string.

Synopsis
value(
    string other) noexcept;
Description

The value is constructed from other, using the same memory resource. To transfer ownership, use std::move:

Example
string str = "The Boost C++ Library Collection";

// transfer ownership
value jv( std::move(str) );

assert( str.empty() );
assert( *str.storage() == *jv.storage() );
Complexity

Constant.

Exception Safety

No-throw guarantee.

Parameters

Name

Description

other

The string to construct with.


PrevUpHomeNext