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

Clean up validation #3082

Merged
merged 4 commits into from
Sep 13, 2022
Merged

Clean up validation #3082

merged 4 commits into from
Sep 13, 2022

Conversation

AreaZR
Copy link
Contributor

@AreaZR AreaZR commented Sep 7, 2022

We can use ranges::is_sorted and ranges::binary_search and pass the checked extensions instead of passing the iterators directly.

We can use ranges::is_sorted and ranges::binary_search and pass the checked extensions instead of passing the iterators directly.
@AreaZR AreaZR requested a review from a team as a code owner September 7, 2022 12:52
tools/validate/validate.cpp Outdated Show resolved Hide resolved
tools/validate/validate.cpp Outdated Show resolved Hide resolved
@StephanTLavavej StephanTLavavej added the enhancement Something can be improved label Sep 7, 2022
@StephanTLavavej
Copy link
Member

Thanks! The use of the ranges algorithms here is a definite improvement (much less verbose). The mem-initializer-list change is a minor improvement (I agree that it's generally better to initialize members to their desired values instead of assigning them later). As I mentioned, I'm neutral on the addition of const to the member function.

tools/validate/validate.cpp Outdated Show resolved Hide resolved
@StephanTLavavej StephanTLavavej self-assigned this Sep 12, 2022
@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 068f0ef into microsoft:main Sep 13, 2022
@StephanTLavavej
Copy link
Member

Thanks for this code cleanup! 😸

@AreaZR AreaZR deleted the validation branch September 26, 2022 16:10
CaseyCarter added a commit to CaseyCarter/STL that referenced this pull request Oct 6, 2022
Co-authored-by: Stephan T. Lavavej <[email protected]>
Co-authored-by: Casey Carter <[email protected]>
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
None yet
Development

Successfully merging this pull request may close these issues.

6 participants