From Jason Turner

[alg.fill]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp8cn02jx0/{from.md → to.md} +13 -6
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 writable to the output
12
- iterator. The type `Size` shall be convertible to an integral
 
13
  type ([[conv.integral]], [[class.conv]]).
14
 
15
- *Effects:* The first algorithm assigns `value` through all the iterators
16
- in the range \[`first`, `last`). The second algorithm assigns `value`
17
- through all the iterators in the range \[`first`, `first + n`) if `n` is
18
- positive, otherwise it does nothing.
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,