| Home | Libraries | People | FAQ | More

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

Construct an `object`.

###### Synopsis

    value(
        object other);

###### Description

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

###### Example

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

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

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

###### Complexity

Constant.

###### Exception Safety

No-throw guarantee.

###### Parameters

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