tmp/tmp2be0r48z/{from.md → to.md}
RENAMED
|
@@ -1,22 +1,23 @@
|
|
| 1 |
#### `vector` constructors, copy, and assignment <a id="vector.cons">[[vector.cons]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
-
explicit vector(const Allocator&
|
| 5 |
```
|
| 6 |
|
| 7 |
*Effects:* Constructs an empty `vector`, using the specified allocator.
|
| 8 |
|
| 9 |
*Complexity:* Constant.
|
| 10 |
|
| 11 |
``` cpp
|
| 12 |
-
explicit vector(size_type n);
|
| 13 |
```
|
| 14 |
|
| 15 |
-
*Effects:* Constructs a `vector` with `n`
|
|
|
|
| 16 |
|
| 17 |
-
*Requires:* `T` shall be `
|
| 18 |
|
| 19 |
*Complexity:* Linear in `n`.
|
| 20 |
|
| 21 |
``` cpp
|
| 22 |
vector(size_type n, const T& value,
|
|
@@ -43,28 +44,5 @@ using the specified allocator.
|
|
| 43 |
is the distance between `first` and `last`) and no reallocations if
|
| 44 |
iterators first and last are of forward, bidirectional, or random access
|
| 45 |
categories. It makes order `N` calls to the copy constructor of `T` and
|
| 46 |
order log(N) reallocations if they are just input iterators.
|
| 47 |
|
| 48 |
-
``` cpp
|
| 49 |
-
template <class InputIterator>
|
| 50 |
-
void assign(InputIterator first, InputIterator last);
|
| 51 |
-
```
|
| 52 |
-
|
| 53 |
-
*Effects:*
|
| 54 |
-
|
| 55 |
-
``` cpp
|
| 56 |
-
erase(begin(), end());
|
| 57 |
-
insert(begin(), first, last);
|
| 58 |
-
```
|
| 59 |
-
|
| 60 |
-
``` cpp
|
| 61 |
-
void assign(size_type n, const T& t);
|
| 62 |
-
```
|
| 63 |
-
|
| 64 |
-
*Effects:*
|
| 65 |
-
|
| 66 |
-
``` cpp
|
| 67 |
-
erase(begin(), end());
|
| 68 |
-
insert(begin(), n, t);
|
| 69 |
-
```
|
| 70 |
-
|
|
|
|
| 1 |
#### `vector` constructors, copy, and assignment <a id="vector.cons">[[vector.cons]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
+
explicit vector(const Allocator&);
|
| 5 |
```
|
| 6 |
|
| 7 |
*Effects:* Constructs an empty `vector`, using the specified allocator.
|
| 8 |
|
| 9 |
*Complexity:* Constant.
|
| 10 |
|
| 11 |
``` cpp
|
| 12 |
+
explicit vector(size_type n, const Allocator& = Allocator());
|
| 13 |
```
|
| 14 |
|
| 15 |
+
*Effects:* Constructs a `vector` with `n` default-inserted elements
|
| 16 |
+
using the specified allocator.
|
| 17 |
|
| 18 |
+
*Requires:* `T` shall be `DefaultInsertable` into `*this`.
|
| 19 |
|
| 20 |
*Complexity:* Linear in `n`.
|
| 21 |
|
| 22 |
``` cpp
|
| 23 |
vector(size_type n, const T& value,
|
|
|
|
| 44 |
is the distance between `first` and `last`) and no reallocations if
|
| 45 |
iterators first and last are of forward, bidirectional, or random access
|
| 46 |
categories. It makes order `N` calls to the copy constructor of `T` and
|
| 47 |
order log(N) reallocations if they are just input iterators.
|
| 48 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|