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

PrevUpHomeNext
key_value_pair::key_value_pair (6 of 7 overloads)

Constructor.

Synopsis
key_value_pair(
    std::pair< string_view, json::value > const& p,
    storage_ptr sp = {});
Description

This constructs a key/value pair. A copy of the specified value is made, using the specified memory resource.

Exception Safety

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

Parameters

Name

Description

p

A std::pair with the key string and value to construct with.

sp

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


PrevUpHomeNext