From Jason Turner

[unord.map.modifiers]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmppxfttor8/{from.md → to.md} +5 -24
tmp/tmppxfttor8/{from.md → to.md} RENAMED
@@ -3,40 +3,21 @@
3
  ``` cpp
4
  template <class P>
5
  pair<iterator, bool> insert(P&& obj);
6
  ```
7
 
8
- *Requires:* `value_type` is constructible from `std::forward<P>(obj)`.
9
-
10
- *Effects:* Inserts `obj` converted to `value_type` if and only if there
11
- is no element in the container with key equivalent to the key of
12
- `value_type(obj)`.
13
-
14
- *Returns:* The `bool` component of the returned `pair` object indicates
15
- whether the insertion took place and the iterator component points to
16
- the element with key equivalent to the key of `value_type(obj)`.
17
-
18
- *Complexity:* Average case 𝑂(1), worst case 𝑂(`size()`).
19
 
20
  *Remarks:* This signature shall not participate in overload resolution
21
- unless `P` is implicitly convertible to `value_type`.
22
 
23
  ``` cpp
24
  template <class P>
25
  iterator insert(const_iterator hint, P&& obj);
26
  ```
27
 
28
- *Requires:* `value_type` is constructible from `std::forward<P>(obj)`.
29
-
30
- *Effects:* Inserts `obj` converted to `value_type` if and only if there
31
- is no element in the container with key equivalent to the key of
32
- `value_type(obj)`. The iterator `hint` is a hint pointing to where the
33
- search should start.
34
-
35
- *Returns:* An iterator that points to the element with key equivalent to
36
- the key of `value_type(obj)`.
37
-
38
- *Complexity:* Average case 𝑂(1), worst case 𝑂(`size()`).
39
 
40
  *Remarks:* This signature shall not participate in overload resolution
41
- unless `P` is implicitly convertible to `value_type`.
42
 
 
3
  ``` cpp
4
  template <class P>
5
  pair<iterator, bool> insert(P&& obj);
6
  ```
7
 
8
+ *Effects:* Equivalent to `return emplace(std::forward<P>(obj))`.
 
 
 
 
 
 
 
 
 
 
9
 
10
  *Remarks:* This signature shall not participate in overload resolution
11
+ unless `std::is_constructible<value_type, P&&>::value` is `true`.
12
 
13
  ``` cpp
14
  template <class P>
15
  iterator insert(const_iterator hint, P&& obj);
16
  ```
17
 
18
+ *Effects:* Equivalent to
19
+ `return emplace_hint(hint, std::forward<P>(obj))`.
 
 
 
 
 
 
 
 
 
20
 
21
  *Remarks:* This signature shall not participate in overload resolution
22
+ unless `std::is_constructible<value_type, P&&>::value` is `true`.
23