3487. Missing precondition on input and output aliasing of [numeric.ops]

Section: 26.10 [numeric.ops] Status: New Submitter: Matthias Kretz Opened: 2020-10-01 Last modified: 2020-10-02

Priority: 3

View all other issues in [numeric.ops].

View all issues with New status.

Discussion:

The algorithms partial_sum, exclusive_scan, inclusive_scan, transform_exclusive_scan, transform_inclusive_scan, and adjacent_difference with no ExecutionPolicy do not have a precondition "result is not in the range [first, last)". But they explicitly allow "result may be equal to first". This suggests the precondition got lost, because otherwise the permission is redundant.

Suggested fix: Add "result is not in the range [first + 1, last)." to the Preconditions paragraphs of the affected generalized numeric operations.

[2020-10-02; Issue processing telecon: Priority set to P3.]

Proposed resolution: