(C++17) | ||||
| Sequence | ||||
(C++11) | ||||
(C++26) | ||||
(C++26) | ||||
(C++11) | ||||
| Associative | ||||
| Unordered associative | ||||
(C++11) | ||||
(C++11) | ||||
(C++11) | ||||
(C++11) | ||||
| Adaptors | ||||
(C++23) | ||||
(C++23) | ||||
(C++23) | ||||
(C++23) | ||||
| Views | ||||
(C++20) | ||||
(C++23) | ||||
| Tables | ||||
| Iterator invalidation | ||||
| Member function table | ||||
| Non-member function table |
iterator insert(const value_type& value) | (1) | (since C++23) |
iterator insert( value_type&& value); | (2) | (since C++23) |
iterator insert( const_iterator pos,const value_type& value); | (3) | (since C++23) |
iterator insert( const_iterator pos, value_type&& value); | (4) | (since C++23) |
template<class InputIt> void insert( InputIt first, InputIt last); | (5) | (since C++23) |
template<class InputIt> void insert(std::sorted_equivalent_t, InputIt first, InputIt last); | (6) | (since C++23) |
void insert(std::initializer_list<key_type> ilist); | (7) | (since C++23) |
void insert(std::sorted_equivalent_t s,std::initializer_list<key_type> ilist); | (8) | (since C++23) |
Inserts element(s) into the container. The order of the remaining equivalent elements is preserved.
[first, last) as if performing the following operations sequentially:[first, last). Equivalent toinsert(first, last);.| Information on iterator invalidation is copied fromhere |
Contents |
| pos | - | iterator to the position before which the new element will be inserted |
| value | - | element value to insert |
| first, last | - | the pair of iterators defining the sourcerange of elements to insert |
| ilist | - | initializer list to insert the values from |
| s | - | a disambiguation tag indicating that the input sequence is sorted (with respect tokey_compare) |
| Type requirements | ||
-InputIt must meet the requirements ofLegacyInputIterator. | ||
| This section is incomplete Reason: exception guarantees 1..8 |
| This section is incomplete Reason: recheck the complexity: 1-4, 8 |
| This section is incomplete Reason: no example |
| constructs element in-place (public member function)[edit] | |
| constructs elements in-place using a hint (public member function)[edit] | |
| creates astd::insert_iterator of type inferred from the argument (function template)[edit] |