Skip to content

<__msvc_string_view.hpp>: Avoid redundant forwarding in char_traits::assign - #5488

Merged
Stephan T. Lavavej (StephanTLavavej) merged 1 commit into
microsoft:mainfrom
frederick-vs-ja:pure-assign-2
May 17, 2025
Merged

<__msvc_string_view.hpp>: Avoid redundant forwarding in char_traits::assign#5488
Stephan T. Lavavej (StephanTLavavej) merged 1 commit into
microsoft:mainfrom
frederick-vs-ja:pure-assign-2

Conversation

@frederick-vs-ja

Copy link
Copy Markdown
Contributor

#3334 (and following-up #4047) made basic_string correctly handle lifetime of elements in constant evaluation, and #4613 made char_traits::assign no longer consider lifetime of elements (as specified by the standard).

However, there're some forwarding calls in char_traits::assign (added by #2305) that were made redundant but not removed. This PR removes the redundant forwarding.

@StephanTLavavej Stephan T. Lavavej (StephanTLavavej) moved this from Initial Review to Ready To Merge in STL Code Reviews May 11, 2025
@StephanTLavavej Stephan T. Lavavej (StephanTLavavej) moved this from Ready To Merge to Merging in STL Code Reviews May 16, 2025
@StephanTLavavej

Copy link
Copy Markdown
Member

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

@StephanTLavavej
Stephan T. Lavavej (StephanTLavavej) merged commit dfceace into microsoft:main May 17, 2025
@github-project-automation github-project-automation Bot moved this from Merging to Done in STL Code Reviews May 17, 2025
@StephanTLavavej

Copy link
Copy Markdown
Member

Thanks for noticing and removing this dead code! 🧟 🧠 😻

@frederick-vs-ja
A. Jiang (frederick-vs-ja) deleted the pure-assign-2 branch May 18, 2025 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Something can be improved

2 participants