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