-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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 P2438R2 string::substr() &&
#3057
Conversation
and update references to Working Draft
It seems that EDG is buggy here:
I'll skip relative cases for EDG. |
And conventionally use arrow comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this looks great! I'll validate and push changes for the minor issues and nitpicks I found.
I'm speculatively mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Going to approve because I don't want to reset testing, but I'll address these comments in a followup.
I've resolved a trivial adjacent-add conflict in |
Thanks for implementing this feature in one of the STL's most-used data structures! 😻 ✅ 🧶 |
And make the old and new
substr
use default constructed allocators.(And consistently refer to WG21-N4910 in
<xstring>
.)Fixes #2928.
Fixes #3022.
As implementation details, the rvalue substring constructors reuse the source storage if and only if
I have no idea how to portably test the probably intended behavior of newly added overloads...