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::value (35 of 35 overloads)

Construct from an initializer-list.

Synopsis
value(
    std::initializer_list< value_ref > init,
    storage_ptr sp = {});
Description

If the initializer list consists of key/value pairs, an object is created. Otherwise an array is created. The contents of the initializer list are copied to the newly constructed value using the specified memory resource.

Complexity

Linear in init.size().

Exception Safety

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

Parameters

Name

Description

init

The initializer list to construct from.

sp

A pointer to the memory_resource to use. The container will acquire shared ownership of the memory resource.


PrevUpHomeNext