key_value_pair::key_value_pair
Copy constructor.
Synopsis
key_value_pair(
key_value_pair const& other); (1)
key_value_pair(
key_value_pair const& other,
storage_ptr sp); (2)
key_value_pair(
key_value_pair&& other) noexcept; (3)
key_value_pair(
pilfered< key_value_pair > other) noexcept; (4)
template<
class... Args>
explicit
key_value_pair(
string_view key,
Args&&... args); (5)
explicit
key_value_pair(
std::pair< string_view, value > const& p,
storage_ptr sp = {}); (6)
explicit
key_value_pair(
std::pair< string_view, value >&& p,
storage_ptr sp = {}); (7)
Description
This constructs a key/value pair with a copy of another key/value pair, using the same memory resource as other
.
Exception Safety
Strong guarantee. Calls to memory_resource::allocate
may throw.
Parameters
Name | Description |
---|---|
|
The key/value pair to copy. |
|
A pointer to the |
|
The key string to use. |
|
Optional arguments forwarded to the |
|
A |