From Jason Turner

[alg.generate]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp4pjvjp4c/{from.md → to.md} +14 -7
tmp/tmp4pjvjp4c/{from.md → to.md} RENAMED
@@ -2,25 +2,32 @@
2
 
3
  ``` cpp
4
  template<class ForwardIterator, class Generator>
5
  void generate(ForwardIterator first, ForwardIterator last,
6
  Generator gen);
 
 
 
 
7
 
8
  template<class OutputIterator, class Size, class Generator>
9
  OutputIterator generate_n(OutputIterator first, Size n, Generator gen);
 
 
 
10
  ```
11
 
12
- *Effects:* The first algorithm invokes the function object `gen` and
13
- assigns the return value of `gen` through all the iterators in the range
14
- \[`first`, `last`). The second algorithm invokes the function object
15
- `gen` and assigns the return value of `gen` through all the iterators in
16
- the range \[`first`, `first + n`) if `n` is positive, otherwise it does
17
- nothing.
18
-
19
  *Requires:* `gen` takes no arguments, `Size` shall be convertible to an
20
  integral type ([[conv.integral]], [[class.conv]]).
21
 
 
 
 
 
 
 
 
22
  *Returns:* `generate_n` returns `first + n` for non-negative values of
23
  `n` and `first` for negative values.
24
 
25
  *Complexity:* Exactly `last - first`, `n`, or 0 invocations of `gen` and
26
  assignments, respectively.
 
2
 
3
  ``` cpp
4
  template<class ForwardIterator, class Generator>
5
  void generate(ForwardIterator first, ForwardIterator last,
6
  Generator gen);
7
+ template<class ExecutionPolicy, class ForwardIterator, class Generator>
8
+ void generate(ExecutionPolicy&& exec,
9
+ ForwardIterator first, ForwardIterator last,
10
+ Generator gen);
11
 
12
  template<class OutputIterator, class Size, class Generator>
13
  OutputIterator generate_n(OutputIterator first, Size n, Generator gen);
14
+ template<class ExecutionPolicy, class ForwardIterator, class Size, class Generator>
15
+ ForwardIterator generate_n(ExecutionPolicy&& exec,
16
+ ForwardIterator first, Size n, Generator gen);
17
  ```
18
 
 
 
 
 
 
 
 
19
  *Requires:* `gen` takes no arguments, `Size` shall be convertible to an
20
  integral type ([[conv.integral]], [[class.conv]]).
21
 
22
+ *Effects:* The `generate` algorithms invoke the function object `gen`
23
+ and assign the return value of `gen` through all the iterators in the
24
+ range \[`first`, `last`). The `generate_n` algorithms invoke the
25
+ function object `gen` and assign the return value of `gen` through all
26
+ the iterators in the range \[`first`, `first + n`) if `n` is positive,
27
+ otherwise they do nothing.
28
+
29
  *Returns:* `generate_n` returns `first + n` for non-negative values of
30
  `n` and `first` for negative values.
31
 
32
  *Complexity:* Exactly `last - first`, `n`, or 0 invocations of `gen` and
33
  assignments, respectively.