Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext
object::insert (3 of 3 overloads)

Insert elements.

Synopsis
void
insert(
    std::initializer_list< std::pair< string_view, value_ref >> init);
Description

The elements in the initializer list whose keys are unique are inserted one at a time, in order. If there are elements with duplicate keys; that is, if multiple elements in the range have keys that compare equal, only the first equivalent element will be inserted.

Complexity

Linear in init.size().

Exception Safety

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

Parameters

Name

Description

init

The initializer list to insert


PrevUpHomeNext