...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Insert elements.
void insert( std::initializer_list< std::pair< string_view, value_ref >> init);
The elements in the initializer list are inserted one at a time, in order.
Any element with key that is a duplicate of a key already present in
container will be skipped. This also means, that if there are two keys
within the initializer list that are equal to each other, only the first
will be inserted. If the size necessary to accomodate elements from the
initializer list exceeds capacity()
,
a rehashing can occur. In that case all iterators and references are
invalidated. Otherwise, they are not affected.
Linear in init.size()
.
Basic guarantee. Calls to memory_resource::allocate
may throw.
Name |
Description |
---|---|
|
The initializer list to insert |