Skip to content

std::set_intersection weeken precondition #8231

@NiceAndPeter

Description

@NiceAndPeter

The std::set_intersection algorithm forbids overlap of the input ranges with the output range, but if first2 and result would be equal, the algorithm could still work.
This would allow inplace execution without memory allocation, which is a big plus.

26.8.7.4 set_intersection (wording)

replace: The resulting range does not overlap with either of the original ranges.
with: result may be equal first2, otherwise the resulting range does not overlap with either of the original ranges.

Metadata

Metadata

Assignees

No one assigned

    Labels

    lwgIssue must be reviewed by LWG.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions