tmp/tmpmdabxz0b/{from.md → to.md}
RENAMED
|
@@ -1,23 +1,16 @@
|
|
| 1 |
#### `map` modifiers <a id="map.modifiers">[[map.modifiers]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
template <class P> pair<iterator, bool> insert(P&& x);
|
| 5 |
-
template <class P>
|
| 6 |
template <class InputIterator>
|
| 7 |
void insert(InputIterator first, InputIterator last);
|
| 8 |
```
|
| 9 |
|
| 10 |
-
*
|
|
|
|
|
|
|
| 11 |
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
converted to `value_type` and inserted into the `map`. Specifically, in
|
| 15 |
-
such cases `CopyConstructible` is not required of `key_type` or
|
| 16 |
-
`mapped_type` unless the conversion from `P` specifically requires it
|
| 17 |
-
(e.g., if `P` is a `tuple<const key_type, mapped_type>`, then `key_type`
|
| 18 |
-
must be `CopyConstructible`). The signature taking `InputIterator`
|
| 19 |
-
parameters does not require `CopyConstructible` of either `key_type` or
|
| 20 |
-
`mapped_type` if the dereferenced `InputIterator` returns a non-const
|
| 21 |
-
rvalue `pair<key_type,mapped_type>`. Otherwise `CopyConstructible` is
|
| 22 |
-
required for both `key_type` and `mapped_type`.
|
| 23 |
|
|
|
|
| 1 |
#### `map` modifiers <a id="map.modifiers">[[map.modifiers]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
template <class P> pair<iterator, bool> insert(P&& x);
|
| 5 |
+
template <class P> iterator insert(const_iterator position, P&& x);
|
| 6 |
template <class InputIterator>
|
| 7 |
void insert(InputIterator first, InputIterator last);
|
| 8 |
```
|
| 9 |
|
| 10 |
+
*Effects:* The first form is equivalent to
|
| 11 |
+
`return emplace(std::forward<P>(x))`. The second form is equivalent to
|
| 12 |
+
`return emplace_hint(position, std::forward<P>(x))`.
|
| 13 |
|
| 14 |
+
*Remarks:* These signatures shall not participate in overload resolution
|
| 15 |
+
unless `std::is_constructible<value_type, P&&>::value` is `true`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
|