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

<xstring>: Make char_traits::assign not start lifetime of elements #4613

Merged
merged 1 commit into from
Apr 26, 2024

Conversation

frederick-vs-ja
Copy link
Contributor

@frederick-vs-ja frederick-vs-ja commented Apr 21, 2024

As specified in [char.traits.specializations], char_traits::assign should just perform assignments. #1502 made these functions also start lifetime of elements since C++20, but this is possibly wrong as the difference is theoretically observable due to lack of constant evaluation failure. This PR reverts changes of char_traits::assign.

Notes:

Edit:

@frederick-vs-ja frederick-vs-ja requested a review from a team as a code owner April 21, 2024 14:52
@StephanTLavavej StephanTLavavej added the enhancement Something can be improved label Apr 21, 2024
@StephanTLavavej
Copy link
Member

Thanks - I agree that this change is correct and desirable. Extra thanks for doing the archaeology to find the PRs that made this no longer necessary. 😻

@StephanTLavavej StephanTLavavej self-assigned this Apr 26, 2024
@StephanTLavavej
Copy link
Member

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

Copy link
Member

@CaseyCarter CaseyCarter left a comment

Choose a reason for hiding this comment

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

Excellent! I'm so glad to see this go away.

@StephanTLavavej StephanTLavavej merged commit fe7f82e into microsoft:main Apr 26, 2024
39 checks passed
@StephanTLavavej
Copy link
Member

Thanks again for noticing that this weird old code was no longer necessary! 😻 🦅 👁️

@frederick-vs-ja frederick-vs-ja deleted the pure-assign branch April 27, 2024 03:13
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.

3 participants