From Jason Turner

[list.cons]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpd6p3ep0_/{from.md → to.md} +5 -18
tmp/tmpd6p3ep0_/{from.md → to.md} RENAMED
@@ -1,22 +1,23 @@
1
  #### `list` constructors, copy, and assignment <a id="list.cons">[[list.cons]]</a>
2
 
3
  ``` cpp
4
- explicit list(const Allocator& = Allocator());
5
  ```
6
 
7
  *Effects:* Constructs an empty list, using the specified allocator.
8
 
9
  *Complexity:* Constant.
10
 
11
  ``` cpp
12
- explicit list(size_type n);
13
  ```
14
 
15
- *Effects:* Constructs a `list` with `n` value-initialized elements.
 
16
 
17
- *Requires:* `T` shall be `DefaultConstructible`.
18
 
19
  *Complexity:* Linear in `n`.
20
 
21
  ``` cpp
22
  list(size_type n, const T& value,
@@ -38,19 +39,5 @@ list(InputIterator first, InputIterator last,
38
 
39
  *Effects:* Constructs a `list` equal to the range \[`first`, `last`).
40
 
41
  *Complexity:* Linear in `distance(first, last)`.
42
 
43
- ``` cpp
44
- template <class InputIterator>
45
- void assign(InputIterator first, InputIterator last);
46
- ```
47
-
48
- *Effects:* Replaces the contents of the list with the range
49
- `[first, last)`.
50
-
51
- ``` cpp
52
- void assign(size_type n, const T& t);
53
- ```
54
-
55
- *Effects:* Replaces the contents of the list with `n` copies of `t`.
56
-
 
1
  #### `list` constructors, copy, and assignment <a id="list.cons">[[list.cons]]</a>
2
 
3
  ``` cpp
4
+ explicit list(const Allocator&);
5
  ```
6
 
7
  *Effects:* Constructs an empty list, using the specified allocator.
8
 
9
  *Complexity:* Constant.
10
 
11
  ``` cpp
12
+ explicit list(size_type n, const Allocator& = Allocator());
13
  ```
14
 
15
+ *Effects:* Constructs a `list` with `n` default-inserted elements using
16
+ the specified allocator.
17
 
18
+ *Requires:* `T` shall be `DefaultInsertable` into `*this`.
19
 
20
  *Complexity:* Linear in `n`.
21
 
22
  ``` cpp
23
  list(size_type n, const T& value,
 
39
 
40
  *Effects:* Constructs a `list` equal to the range \[`first`, `last`).
41
 
42
  *Complexity:* Linear in `distance(first, last)`.
43