...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Assignment.
value
& operator=(std::initializer_list
<value_ref
> init);
Replace *this
with the value formed by constructing from init
and this->storage()
.
If the initializer list consists of key/value pairs, the resulting object
is assigned. Otherwise an array
is assigned. The contents
of the initializer list are moved to *this
using the existing memory resource.
Linear in init.size()
.
Strong guarantee. Calls to memory_resource::allocate
may throw.
Name |
Description |
---|---|
|
The initializer list to assign from. |