tmp/tmp8cn02jx0/{from.md → to.md}
RENAMED
|
@@ -1,23 +1,30 @@
|
|
| 1 |
### Fill <a id="alg.fill">[[alg.fill]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
template<class ForwardIterator, class T>
|
| 5 |
void fill(ForwardIterator first, ForwardIterator last, const T& value);
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
template<class OutputIterator, class Size, class T>
|
| 8 |
OutputIterator fill_n(OutputIterator first, Size n, const T& value);
|
|
|
|
|
|
|
|
|
|
| 9 |
```
|
| 10 |
|
| 11 |
-
*Requires:* The expression `value` shall be
|
| 12 |
-
iterator.
|
|
|
|
| 13 |
type ([[conv.integral]], [[class.conv]]).
|
| 14 |
|
| 15 |
-
*Effects:* The
|
| 16 |
-
in the range \[`first`, `last`). The
|
| 17 |
-
through all the iterators in the range \[`first`,
|
| 18 |
-
positive, otherwise
|
| 19 |
|
| 20 |
*Returns:* `fill_n` returns `first + n` for non-negative values of `n`
|
| 21 |
and `first` for negative values.
|
| 22 |
|
| 23 |
*Complexity:* Exactly `last - first`, `n`, or 0 assignments,
|
|
|
|
| 1 |
### Fill <a id="alg.fill">[[alg.fill]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
template<class ForwardIterator, class T>
|
| 5 |
void fill(ForwardIterator first, ForwardIterator last, const T& value);
|
| 6 |
+
template<class ExecutionPolicy, class ForwardIterator, class T>
|
| 7 |
+
void fill(ExecutionPolicy&& exec,
|
| 8 |
+
ForwardIterator first, ForwardIterator last, const T& value);
|
| 9 |
|
| 10 |
template<class OutputIterator, class Size, class T>
|
| 11 |
OutputIterator fill_n(OutputIterator first, Size n, const T& value);
|
| 12 |
+
template<class ExecutionPolicy, class ForwardIterator, class Size, class T>
|
| 13 |
+
ForwardIterator fill_n(ExecutionPolicy&& exec,
|
| 14 |
+
ForwardIterator first, Size n, const T& value);
|
| 15 |
```
|
| 16 |
|
| 17 |
+
*Requires:* The expression `value` shall be
|
| 18 |
+
writable ([[iterator.requirements.general]]) to the output iterator.
|
| 19 |
+
The type `Size` shall be convertible to an integral
|
| 20 |
type ([[conv.integral]], [[class.conv]]).
|
| 21 |
|
| 22 |
+
*Effects:* The `fill` algorithms assign `value` through all the
|
| 23 |
+
iterators in the range \[`first`, `last`). The `fill_n` algorithms
|
| 24 |
+
assign `value` through all the iterators in the range \[`first`,
|
| 25 |
+
`first + n`) if `n` is positive, otherwise they do nothing.
|
| 26 |
|
| 27 |
*Returns:* `fill_n` returns `first + n` for non-negative values of `n`
|
| 28 |
and `first` for negative values.
|
| 29 |
|
| 30 |
*Complexity:* Exactly `last - first`, `n`, or 0 assignments,
|