| Home | Libraries | People | FAQ | More

###### value::value (31 of 35 overloads)

Construct an `object`.

<h7> Synopsis </h7>

    value(
        object other);

<h7> Description </h7>

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

<h7> Example </h7>

    object obj( {{"a",1}, {"b",2}, {"c"},3}} );

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

    assert( obj.empty() );
    assert( *obj.storage() == *jv.storage() );

<h7> Complexity </h7>

Constant.

<h7> Exception Safety </h7>

No-throw guarantee.

<h7> Parameters </h7>

Name | Description
--- | ---
`other` | The object to construct with.