From Jason Turner

[transform.exclusive.scan]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpujibslql/{from.md → to.md} +18 -17
tmp/tmpujibslql/{from.md → to.md} RENAMED
@@ -1,38 +1,39 @@
1
  ### Transform exclusive scan <a id="transform.exclusive.scan">[[transform.exclusive.scan]]</a>
2
 
3
  ``` cpp
4
  template<class InputIterator, class OutputIterator, class T,
5
  class BinaryOperation, class UnaryOperation>
6
- OutputIterator transform_exclusive_scan(InputIterator first, InputIterator last,
7
- OutputIterator result,
8
- T init,
9
- BinaryOperation binary_op,
10
- UnaryOperation unary_op);
11
  template<class ExecutionPolicy,
12
  class ForwardIterator1, class ForwardIterator2, class T,
13
  class BinaryOperation, class UnaryOperation>
14
- ForwardIterator2 transform_exclusive_scan(ExecutionPolicy&& exec,
 
15
  ForwardIterator1 first, ForwardIterator1 last,
16
- ForwardIterator2 result,
17
- T init,
18
- BinaryOperation binary_op,
19
- UnaryOperation unary_op);
20
  ```
21
 
22
- *Requires:*
23
 
24
- - `T` shall be `MoveConstructible` (Table  [[tab:moveconstructible]]).
25
- - All of
26
  - `binary_op(init, init)`,
27
  - `binary_op(init, unary_op(*first))`, and
28
  - `binary_op(unary_op(*first), unary_op(*first))`
29
 
30
- shall be convertible to `T`.
31
- - Neither `unary_op` nor `binary_op` shall invalidate iterators or
32
- subranges, or modify elements in the ranges \[`first`, `last`\] or
33
- \[`result`, `result + (last - first)`\].
 
 
 
 
 
34
 
35
  *Effects:* For each integer `K` in \[`0`, `last - first`) assigns
36
  through `result + K` the value of:
37
 
38
  ``` cpp
 
1
  ### Transform exclusive scan <a id="transform.exclusive.scan">[[transform.exclusive.scan]]</a>
2
 
3
  ``` cpp
4
  template<class InputIterator, class OutputIterator, class T,
5
  class BinaryOperation, class UnaryOperation>
6
+ constexpr OutputIterator
7
+ transform_exclusive_scan(InputIterator first, InputIterator last,
8
+ OutputIterator result, T init,
9
+ BinaryOperation binary_op, UnaryOperation unary_op);
 
10
  template<class ExecutionPolicy,
11
  class ForwardIterator1, class ForwardIterator2, class T,
12
  class BinaryOperation, class UnaryOperation>
13
+ ForwardIterator2
14
+ transform_exclusive_scan(ExecutionPolicy&& exec,
15
  ForwardIterator1 first, ForwardIterator1 last,
16
+ ForwardIterator2 result, T init,
17
+ BinaryOperation binary_op, UnaryOperation unary_op);
 
 
18
  ```
19
 
20
+ *Mandates:* All of
21
 
 
 
22
  - `binary_op(init, init)`,
23
  - `binary_op(init, unary_op(*first))`, and
24
  - `binary_op(unary_op(*first), unary_op(*first))`
25
 
26
+ are convertible to `T`.
27
+
28
+ *Preconditions:*
29
+
30
+ - `T` meets the *Cpp17MoveConstructible* ([[cpp17.moveconstructible]])
31
+ requirements.
32
+ - Neither `unary_op` nor `binary_op` invalidates iterators or subranges,
33
+ nor modifies elements in the ranges \[`first`, `last`\] or \[`result`,
34
+ `result + (last - first)`\].
35
 
36
  *Effects:* For each integer `K` in \[`0`, `last - first`) assigns
37
  through `result + K` the value of:
38
 
39
  ``` cpp