1. Overview
A few fixes for the C++17 parallel algorithms which should have been included in other papers slipped through the cracks.
This paper addresses NB comments US 161, US 162 and US 184.
2. Proposed Changes
The following changes are relative to the latest working paper as of 03-02-2017 ([N4640]) with the changes from [P0467r2] and [P0574r1] applied.
The � character is used to denote a placeholder section number.
2.1. Add Type Requirements From [P0574r1] To [P0452r1]'s New transform_reduce Signature
Modify the requirements for the new signatures of transform_reduce added by [P0452r1] to 26.8.4 [transform.reduce]:
� Requires:
Tshall beMoveConstructible(Table 23).- All of
binary_op1(init, binary_op2(*first1, *first2)),binary_op1(binary_op2(*first1, *first2), init),binary_op1(init, init), andbinary_op1(binary_op2(*first1, *first2),binary_op2(*first1, *first2))shall be convertible toT.Neither
binary_op1norbinary_op2shall invalidate subranges, or modify elements in the ranges[first1, last1and)][first2, first2 + (last1 - first1).)]
Direction to the Editor: Add a footnote to the use of fully-closed ranges in the change above that says The use of fully closed ranges is intentional .
2.2. Forbid The result == first Case For Parallel adjacent_difference
Modify the remark in 26.8.11 paragraph 3 regarding whether the input and output
ranges given to adjacent_difference can overlap:
3 Remarks: For the overloads with noExecutionPolicy,resultmay be equal tofirst. For the overloads with anExecutionPolicy, the ranges[first, last)and[result, result + (last - first))shall not overlap.