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

Implement LWG-3743 ranges::to's reserve may be ill-formed #3269

Merged
merged 8 commits into from
Dec 15, 2022

Conversation

fsb4000
Copy link
Contributor

@fsb4000 fsb4000 commented Dec 6, 2022

Fixes #3224

@fsb4000 fsb4000 requested a review from a team as a code owner December 6, 2022 16:51
@CaseyCarter CaseyCarter added the LWG Library Working Group issue label Dec 6, 2022
@fsb4000
Copy link
Contributor Author

fsb4000 commented Dec 6, 2022

// LWG example
auto r = std::ranges::subrange(std::views::iota(0ULL) | std::views::take(5), 5);
auto v = r | std::ranges::to<std::vector<std::size_t>>(0);

The LWG example gives me a mixed signed/unsigned warning and I changed 0 to 0ULL without having a full understanding of where it is used and I only tested X86-64

@CaseyCarter CaseyCarter self-requested a review December 6, 2022 18:30
Copy link
Contributor

@strega-nil-ms strega-nil-ms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much!

@strega-nil-ms
Copy link
Contributor

strega-nil-ms commented Dec 7, 2022

@CaseyCarter changes have been pushed to add a TRANSITION comment and resolve your comments if you would like to re-review.

stl/inc/xutility Outdated Show resolved Hide resolved
@StephanTLavavej
Copy link
Member

@strega-nil-ms @CaseyCarter I pushed a change to fix damaged bug number citations.

@StephanTLavavej StephanTLavavej self-assigned this Dec 15, 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 a66a092 into microsoft:main Dec 15, 2022
@StephanTLavavej
Copy link
Member

Thanks for implementing this LWG issue resolution - well-formed code is so much nicer than ill-formed! 😹 🛠️ 🎉

@fsb4000 fsb4000 deleted the fix3224 branch December 15, 2022 23:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LWG Library Working Group issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LWG-3743 ranges::to's reserve may be ill-formed
4 participants