Section: 29.8.5 [transform.reduce] Status: Tentatively Ready Submitter: Billy Robert O'Neal III Opened: 2017-12-15 Last modified: 2018-01-20
View all issues with Tentatively Ready status.
Since there exists only one common Effects element for both the parallel and the non-parallel form of transform_reduce without explicit operation parameters, the current specification of a function call std::transform_reduce(exec, first1, last1, first2, init) has the same effect as if the ExecutionPolicy would have been ignored. Presumably this effect is unintended.
[ 2018-01-15 Moved to Tentatively Ready after 5 positive votes on c++std-lib. ]
This wording is relative to N4713.
Modify 29.8.5 [transform.reduce] as indicated:
template<class InputIterator1, class InputIterator2, class T> T transform_reduce(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, T init);
template<class ExecutionPolicy, class ForwardIterator1, class ForwardIterator2, class T> T transform_reduce(ExecutionPolicy&& exec, ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2, T init);
-1- Effects: Equivalent to:return transform_reduce( first1, last1, first2, init, plus<>(), multiplies<>());