microsoft / microsoft/STL

`<algorithm>`: Investigate the precondition fix in P3179R9 for existing algorithms

Open
#5,829 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C++
Stars
11.1k
Forks
1.7k
Avg merge
4d 15h
Merged PRs (30d)
22

Description

WG21-P3179R9 (tracked in #5610) fixed preconditions for the following algorithms, for both std and ranges versions:

  • copy
  • copy_if
  • move
  • transform
  • replace_copy
  • replace_copy_if
  • remove_copy
  • remove_copy_if
  • unique_copy
  • partition_copy
  • set_union
  • set_intersection
  • set_difference
  • set_symmetric_difference

I think the precondition fix should be treated as an LWG DR as it probably superseded LWG-4262 (as noted in https://github.com/microsoft/STL/pull/5683#discussion_r2488923707). Perhaps we should investigate whether our precondition checks (if any) are still correct.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with WG21-P3179R9 and the related issue #5610, then inspect the precondition handling for the listed algorithms in both std and ranges versions. No file or test is named; the investigation is complete when the existing checks have been compared with the paper and any discrepancy is clearly identified.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.