Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<xutility>, <algorithm>: Add top level const on pointer parameters #4410

Conversation

KamathScience
Copy link
Contributor

Closes #4385

This PR adds the top-level const to the _Ty* _First, _Ty* _Last parameters for the following functions
<algorithm> : __std_minmax_element, __std_minmax
<xutility>: __std_find_trivial_unsized, __std_min, __std_max

@KamathScience KamathScience requested a review from a team as a code owner February 19, 2024 01:02
@KamathScience
Copy link
Contributor Author

@KamathScience please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@microsoft-github-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@microsoft-github-policy-service agree

Contributor License Agreement

@microsoft-github-policy-service agree

@frederick-vs-ja
Copy link
Contributor

Changes for following functions still seem missing:

In <xutility>:

  • __std_count_trivial
  • __std_find_trivial
  • __std_min_element
  • __std_max_element

In <algorithm>:

  • __std_find_last_trivial

@StephanTLavavej StephanTLavavej added the enhancement Something can be improved label Feb 19, 2024
@StephanTLavavej StephanTLavavej self-assigned this Feb 19, 2024
@StephanTLavavej StephanTLavavej removed their assignment Feb 21, 2024
@StephanTLavavej
Copy link
Member

Looks great, thanks! We merge PRs simultaneously to the MSVC-internal and GitHub repos in a semi-manual process, batching up PRs to save time. Your PR will be part of the next batch, likely later this week - I'll post comments as I mirror the PRs and then finally merge 'em.

@KamathScience
Copy link
Contributor Author

Thank you all, this process has been incredibly smooth for me!

@StephanTLavavej StephanTLavavej self-assigned this Feb 23, 2024
@StephanTLavavej
Copy link
Member

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

@StephanTLavavej StephanTLavavej merged commit 605c733 into microsoft:main Feb 27, 2024
35 checks passed
@StephanTLavavej
Copy link
Member

Thanks again, and congratulations on your first microsoft/STL commit! 🎉 🥳 😸

This is expected to ship in VS 2022 17.10 Preview 3, and has been recorded in the STL Changelog.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Something can be improved
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

<xutility>, <algorithm>: vector algorithms dispatching functions miss top level const on pointer parameters
4 participants