mirror of
https://github.com/boostorg/unordered.git
synced 2025-07-29 19:07:15 +02:00
Add missing reference docs for member function template insert
for unordered_map/multimap
This commit is contained in:
@ -120,12 +120,20 @@ public:
|
||||
std::pair<iterator, bool>
|
||||
insert(value_type&& obj);
|
||||
|
||||
template <class P>
|
||||
std::pair<iterator, bool>
|
||||
insert(P&& value);
|
||||
|
||||
insert_return_type insert(node_type&& nh);
|
||||
|
||||
iterator insert(const_iterator hint, value_type const& obj);
|
||||
iterator insert(const_iterator hint, value_type&& obj);
|
||||
iterator insert(const_iterator hint, node_type&& nh);
|
||||
|
||||
template <class P>
|
||||
std::pair<iterator, bool>
|
||||
insert(const_iterator hint, P&& value);
|
||||
|
||||
template<typename InputIterator>
|
||||
void insert(InputIterator first, InputIterator last);
|
||||
|
||||
@ -795,6 +803,21 @@ Notes:: Can invalidate iterators, but only if the insert causes the load factor
|
||||
|
||||
---
|
||||
|
||||
==== Emplace Insert
|
||||
```c++
|
||||
template <class P>
|
||||
std::pair<iterator, bool>
|
||||
insert(P&& value);
|
||||
```
|
||||
|
||||
Inserts an element into the container by performing `emplace(std::forward<P>(value))`.
|
||||
|
||||
Only participates in overload resolution if `std::is_constructible<value_type, P&&>::value` is `true`.
|
||||
|
||||
Returns:: The bool component of the return type is true if an insert took place. If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent key.
|
||||
|
||||
---
|
||||
|
||||
==== Insert with `node_handle`
|
||||
```c++
|
||||
insert_return_type
|
||||
@ -852,6 +875,26 @@ Notes:: The standard is fairly vague on the meaning of the hint. But the only pr
|
||||
|
||||
---
|
||||
|
||||
==== Emplace Insert with Hint
|
||||
|
||||
```c++
|
||||
template <class P>
|
||||
std::pair<iterator, bool>
|
||||
insert(const_iterator hint, P&& value);
|
||||
```
|
||||
|
||||
Inserts an element into the container by performing `emplace(std::forward<P>(value))`.
|
||||
|
||||
Only participates in overload resolution if `std::is_constructible<value_type, P&&>::value` is `true`.
|
||||
|
||||
`hint` is a suggestion to where the element should be inserted.
|
||||
|
||||
Returns:: The bool component of the return type is true if an insert took place. If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent key.
|
||||
|
||||
Notes:: The standard is fairly vague on the meaning of the hint. But the only practical way to use it, and the only way that Boost.Unordered supports is to point to an existing element with the same key. Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor. Pointers and references to elements are never invalidated.
|
||||
|
||||
---
|
||||
|
||||
==== Insert with Hint and `node_handle`
|
||||
```c++
|
||||
iterator insert(const_iterator hint, node_type&& nh);
|
||||
|
@ -120,12 +120,20 @@ public:
|
||||
std::pair<iterator, bool>
|
||||
insert(value_type&& obj);
|
||||
|
||||
template <class P>
|
||||
iterator
|
||||
insert(P&& value);
|
||||
|
||||
insert_return_type insert(node_type&& nh);
|
||||
|
||||
iterator insert(const_iterator hint, value_type const& obj);
|
||||
iterator insert(const_iterator hint, value_type&& obj);
|
||||
iterator insert(const_iterator hint, node_type&& nh);
|
||||
|
||||
template <class P>
|
||||
iterator
|
||||
insert(const_iterator hint, P&& value);
|
||||
|
||||
template<typename InputIterator>
|
||||
void insert(InputIterator first, InputIterator last);
|
||||
|
||||
@ -787,6 +795,21 @@ Notes:: Can invalidate iterators, but only if the insert causes the load factor
|
||||
|
||||
---
|
||||
|
||||
==== Emplace Insert
|
||||
```c++
|
||||
template <class P>
|
||||
iterator
|
||||
insert(P&& value);
|
||||
```
|
||||
|
||||
Inserts an element into the container by performing `emplace(std::forward<P>(value))`.
|
||||
|
||||
Only participates in overload resolution if `std::is_constructible<value_type, P&&>::value` is `true`.
|
||||
|
||||
Returns:: An iterator pointing to the inserted element.
|
||||
|
||||
---
|
||||
|
||||
==== Insert with `node_handle`
|
||||
```c++
|
||||
insert_return_type
|
||||
@ -844,6 +867,25 @@ Notes:: The standard is fairly vague on the meaning of the hint. But the only pr
|
||||
|
||||
---
|
||||
|
||||
==== Emplace Insert with Hint
|
||||
```c++
|
||||
template <class P>
|
||||
iterator
|
||||
insert(P&& value);
|
||||
```
|
||||
|
||||
Inserts an element into the container by performing `emplace(std::forward<P>(value))`.
|
||||
|
||||
Only participates in overload resolution if `std::is_constructible<value_type, P&&>::value` is `true`.
|
||||
|
||||
`hint` is a suggestion to where the element should be inserted.
|
||||
|
||||
Returns:: An iterator pointing to the inserted element.
|
||||
|
||||
Notes:: The standard is fairly vague on the meaning of the hint. But the only practical way to use it, and the only way that Boost.Unordered supports is to point to an existing element with the same key. Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor. Pointers and references to elements are never invalidated.
|
||||
|
||||
---
|
||||
|
||||
==== Insert with Hint and `node_handle`
|
||||
```c++
|
||||
iterator insert(const_iterator hint, node_type&& nh);
|
||||
|
Reference in New Issue
Block a user